Skip to content

Flutter ​

The Aidlab Flutter SDK connects Flutter apps on Android and iOS to Aidlab, Aidlab 2 and Aidmed One. It requires Android 9 (API 28) and iOS 15 or newer.

Installation ​

  1. Add dependency:
    bash
    flutter pub add aidlab_sdk
  2. Configure Bluetooth permissions and platform requirements (the SDK does not manage permissions or BT state).
    • iOS: set the deployment target to iOS 15.0 or higher, then add to ios/Runner/Info.plist:
      xml
      <key>NSBluetoothAlwaysUsageDescription</key>
      <string>Your custom message explaining why your app needs Bluetooth access.</string>
      In Xcode, set Strip Style of the Runner target to Non-Global Symbols. The SDK looks up its native symbols at runtime, and release archives strip them otherwise.
    • 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"/>
    • in android/app/build.gradle.kts, set Android minSdk = 28 or higher (minSdkVersion 28 in Groovy-based projects)
  3. Run your app on a physical device:
    bash
    flutter run