How johnykoudsi/nfc_host_card_emulation works
Project type and purpose
• This is a Flutter-based cross-platform mobile application (“nfa”) focused on NFC functionality (read/write and host card emulation).
• Key indicators:
• lib/core/notifier/nfc_notifier.dart – state-management for NFC events
• lib/presentation/screen/read_write_nfc_screen.dart – UI to read/write tags
• android/app/src/.../MyHostApduService.java/.kt and apduservice.xml – Android HCE service
File structure
• Top-level:
• android/ – native Android project with Java/Kotlin HCE service
• ios/ – native iOS runner (no custom NFC code)
• lib/
– core/notifier – business logic for NFC
– presentation/screen/widgets – UI layer
– main.dart – app entry point
• test/ – widget tests
• Patterns: MVVM / layered architecture (presentation ↔ core/notifier ↔ platform channel ↔ native)
• Config & build: pubspec.yaml (Dart deps), AndroidManifest.xml (permissions, HCE service), Gradle, Xcode projects
Detailed capture of essential elements
• Flutter UI (screens + widgets)
• Business logic (notifier, state)
• Engine / Platform interface
• Native platform modules (Android HCE vs. iOS runner)
• Physical NFC components (chip, tags)
• Callback loop: Native → Flutter → UI