Posix SDK is a bluetooth plugin for Flutter, a new app SDK to help developers build modern multi-platform apps. Sample app Github link.

Cross-Platform Bluetooth LE

Posix SDK aims to offer the most from both platforms (iOS and Android).

Using the Posix SDK instance, you can scan for and check LED to nearby devices (BluetoothDevice).


Obtain an instance

PosixSdk posixSdk = PosixSdk.instance;

Check LED for devices

// Start scanning
posixSdk.connect(device: result.device);

Getting Started

Change the minSdkVersion for Android

Flutter_blue is compatible only from version 19 of Android SDK so you should change this in android/app/build.gradle:

Android {
  defaultConfig {
     minSdkVersion: 19

Add permissions for Bluetooth

We need to add the permission to use Bluetooth and access location:


In the android/app/src/main/AndroidManifest.xml let’s add:

	 <uses-permission android:name="android.permission.BLUETOOTH" />  
	 <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />  
	 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>  


In the ios/Runner/Info.plist let’s add:

	    <string>Need BLE permission</string>  
	    <string>Need BLE permission</string>  
	    <string>Need Location permission</string>  
	    <string>Need Location permission</string>  
	    <string>Need Location permission</string>

For location permissions on iOS see more at: