Skip to main content

usesmileid_kamera 1.2.0 copy "usesmileid_kamera: ^1.2.0" to clipboard
usesmileid_kamera: ^1.2.0 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 #

usesmileid_kamera, the Flutter wrapper for kamera. It embeds the two native cores rather than reimplementing them, and it depends on no third-party camera plugin. It replaced the camera plugin in the Smile ID Flutter SDK.

In production: 1.0.6 in the Smile ID v12 Flutter SDK (12.1.1).

How it works #

  • The control plane is Pigeon (pigeons/kamera_api.dart, generated code committed and drift-gated): configuration, lifecycle, capture and controls. Events (session state, analysis results, metrics, errors) come over one event channel, which every Dart listener shares.
  • Preview: a Texture fed by the Android core's SurfaceTexture, counter-rotated and cover-fit in Dart; on iOS, a UiKitView hosting the native preview layer, which is GPU-composited and copy-free.
  • Pixels never cross the bridge. Frames go to KameraFrameHub natively, where the host SDK's analyzers take them. Dart receives results and file paths only.
  • One native session per engine. Every Dart KameraSession drives it, so the one that called start() last owns the camera, and a stop() or release() from a superseded session does nothing (SPEC.md §6.3).
  • iOS is SPM-only: the glue is a Swift package that pins kamera-spm exactly (docs/design/18). The Android glue ships both ML adapters, ML Kit and HMS: -PkameraMlBackend=mlkit or huawei keeps one, and none adds neither.

Layout #

lib/          Dart API: KameraSession, KameraPreviewView, KameraConfig, events
pigeons/      The Pigeon schema
android/      Kotlin glue over kamera-android
ios/          Swift package glue over kamera-spm
sample/       The Kamera Lab (docs/design/36, 37)

The replay kit is the separate usesmileid_kamera_testing package (../kamera-flutter-testing).

Build and test #

cd kamera-flutter
flutter analyze && flutter test
cd sample && flutter build apk --release   # the Lab; install it with adb install -r -g

Against locally built cores: ../docs/local-dev.md.

Requirements #

Dart ^3.11 · Flutter stable · Android minSdk 24 · iOS 15.0, the production Smile ID Flutter SDK's floors.

0
likes
150
points
4.24k
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