usesmileid_kamera 1.0.6 copy "usesmileid_kamera: ^1.0.6" to clipboard
usesmileid_kamera: ^1.0.6 copied to clipboard

Smile ID's purpose-built camera SDK for Flutter. A thin wrapper embedding the native kamera cores (kamera-android / kamera-ios). Pixels never cross the bridge.

kamera-flutter #

The Flutter SDK for kamera — a thin, faithful wrapper that embeds the native kamera cores (kamera-android, kamera-ios). It replaces the third-party camera plugin used by the production Smile ID Flutter SDK today.

What this is #

  • A Flutter plugin (kamera) whose Android artifact depends on kamera-android and whose iOS pod/xcframework depends on kamera-ios. No camera plugin, no third-party camera code.
  • Preview via the texture layer (Texture widget fed by a SurfaceTexture/FlutterTexture the native core renders into) — the fast path on low-end devices; no hybrid composition.
  • Control plane via Pigeon-generated type-safe channels (pigeons/kamera_api.dart): configuration, lifecycle, capture, zoom/torch/focus, plus an event stream for analysis results and session state.
  • Pixels never cross the bridge. Frame analysis (ML Kit / Vision through the frozen Analyzer pattern) runs natively; Dart receives events (face box, document corners, quality signals) and capture file paths only. The current CameraImage → YuvFrame → bridge copy path in the production SDK disappears entirely.

Goals #

  1. Give Flutter exactly the native camera behavior — pinned resolutions, ZSL/MaxQuality capture, tuned defaults — instead of ResolutionPreset.medium best-effort.
  2. One Dart API (KameraSession, KameraPreviewView, KameraConfig) mirroring the shared contract in ../SPEC.md §3.
  3. Serve as the ML staging ground for Flutter: sample/ renders native analysis events live so ML experiments validate here before the production Flutter SDK.

Layout #

lib/             Dart API (KameraSession, KameraPreviewView, KameraConfig, events)
pigeons/         Pigeon API definitions (codegen source of truth)
android/         Thin glue → kamera-android
ios/usesmileid_kamera/      Thin glue → kamera-ios (SPM package; no podspec — see docs/design/18)
sample/          Sample app — texture preview, analysis event overlay, capture

ML backend toggle #

The Android glue defaults to the ML Kit adapter; switch with one flag (docs/design/20 D4): -PkameraMlBackend=huawei (or KAMERA_ML_BACKEND=huawei) puts com.usesmileid:kamera-huawei on the host classpath and injects the HMS repo — none adds no adapter. iOS pairs with Vision (KameraVision); HMS ML is Android-only, a documented platform divergence.

Local development #

Wire the glue to locally built cores — Android via publishToMavenLocal, iOS via locally built xcframeworks. Walkthrough: ../docs/local-dev.md.

Requirements #

Dart ^3.11.0 · Flutter stable · androidMinSdk 24 · iOS 15.0 (matches the production Smile ID Flutter SDK)

Status #

Bootstrapping — Dart API stubs and Pigeon definitions in place. See ../SPEC.md §6.3 and milestones §9.

0
likes
150
points
549
downloads

Documentation

API reference

Publisher

verified publishersmileidentity.com

Weekly Downloads

Smile ID's purpose-built camera SDK for Flutter. A thin wrapper embedding the native kamera cores (kamera-android / kamera-ios). Pixels never cross the bridge.

Homepage
Repository (GitHub)

License

MIT (license)

Dependencies

flutter, meta

More

Packages that depend on usesmileid_kamera

Packages that implement usesmileid_kamera