FlutterBluePlus class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
cancelWhenScanComplete (StreamSubscription subscription )
→ void
Register a subscription to be canceled when scanning is complete.
This function simplifies cleanup, so you can prevent creating duplicate stream subscriptions.
getPhySupport ()
→ Future <PhySupport >
Request Bluetooth PHY support
log (String s )
→ void
scan ()
→ Stream <ScanResult >
setLogLevel (LogLevel level , {dynamic color = true })
→ Future <void >
Sets the internal FlutterBlue log level
setOptions ({bool showPowerAlert = true , bool restoreState = false })
→ Future <void >
Set configurable options
startScan ({List <Guid > withServices = const [] , List <String > withRemoteIds = const [] , List <String > withNames = const [] , List <String > withKeywords = const [] , List <MsdFilter > withMsd = const [] , List <ServiceDataFilter > withServiceData = const [] , Duration ? timeout , Duration ? removeIfGone , bool continuousUpdates = false , int continuousDivisor = 1 , bool oneByOne = false , bool androidLegacy = false , AndroidScanMode androidScanMode = AndroidScanMode.lowLatency , bool androidUsesFineLocation = false , bool androidCheckLocationServices = true , List <Guid > webOptionalServices = const [] })
→ Future <void >
Start a scan, and return a stream of results
Note: scan filters use an "or" behavior. i.e. if you set withServices
& withNames
we
return all the advertisments that match any of the specified services or any of the specified names.
stopScan ()
→ Future <void >
Stops a scan for Bluetooth Low Energy devices
systemDevices (List <Guid > withServices )
→ Future <List <BluetoothDevice > >
Retrieve a list of devices currently connected to the system
turnOff ({int timeout = 10 })
→ Future <void >
Turn off Bluetooth (Android only),
turnOn ({int timeout = 60 })
→ Future <void >
Turn on Bluetooth (Android only),