Flutter
Follow these steps to integrate the Aidlab Flutter SDK.
- Install Flutter (see the Flutter Installation Guide).
- Create a project:bash
flutter create my_project cd my_project - Add dependency:bash
flutter pub add aidlab_sdk - Flutter SDK
2.3.xis a breaking release.AidlabManager.scan(...)is now delegate-driven and reports devices viadidDiscover- the SDK is FFI-first and expects one transport instance per discovered device
Deviceobjects are single-use, so create a fresh instance for each connection attempt
- Configure Bluetooth permissions and platform requirements (the SDK does not manage permissions or BT state).
- iOS: add to
ios/Runner/Info.plist:xml<key>NSBluetoothAlwaysUsageDescription</key> <string>Your custom message explaining why your app needs Bluetooth access.</string> - Android: in
AndroidManifest.xml:xml<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/> <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/> - set
minSdkVersionto28or higher
- iOS: add to
- Run your app on a physical device:bash
flutter run