How sophoun/khqr_widget works
Project type and purpose
• This is a Flutter-package (khqr_widget) that provides two reusable QR-code widgets conforming to the Cambodia QR spec. It’s not a stand-alone app or microservice—rather it’s a UI widget library to be consumed by any Flutter application on mobile, desktop, or web.
File structure
• Top-level “lib/” folder contains the source API:
• khqr_widget.dart (public export)
• src/khqr_widget.dart (main QR widget)
• src/khqr_stand_widget.dart (alternate layout widget)
• src/scale.dart (layout helpers)
• “example/” holds a full multi-platform Flutter app demonstrating usage.
• Platform folders (android/, ios/, linux/, macos/, windows/, web/) are auto-generated for the example and for plugin support but contain no custom platform‐channel code.
• Configuration files: pubspec.yaml (declares dependencies and metadata), publish.sh (release script), analysis_options.yaml, .gitignore, LICENSE, CHANGELOG.md.
README for additional insights
• Describes two widgets (KhqrWidget and KhqrStandWidget), their parameters and callbacks.
• No external services or backends are referenced—everything is pure Dart/UI.
Elements
• Clearly labeled nodes for:
– Client App
– khqr_widget Library
– Flutter Framework (Widget → Render → Engine)
– Platform Embedders (Android, iOS, Linux, macOS, Windows, Web)
– Build-time: pub get → asset bundling → compilation
– Runtime: client → library API → widget tree → engine → OS
– Framework layers (another)
– Platform embedders (third)
Final Recommendations
• Be as detailed as possible in identifying each layer, but avoid implying any hidden backend or services since this is a pure UI library.
• Two primary flows: build/integration flow (flutter pub → compile → assemble) and runtime/rendering flow (widget invocations → rendering pipeline → native surface).
• Timers (for countdown), asset loading (qrIcon, images), and customization callbacks (onRetry, onCountingDown) as interactions inside the widget library.