FlutterBluePlus class
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
adapterName
→ Future<
String> -
Return the friendly Bluetooth name of the local Bluetooth adapter
no setter
-
adapterState
→ Stream<
BluetoothAdapterState> -
Gets the current state of the Bluetooth module
no setter
- adapterStateNow → BluetoothAdapterState
-
The current adapter state
no setter
-
bondedDevices
→ Future<
List< BluetoothDevice> > -
Retrieve a list of bonded devices (Android only)
no setter
-
connectedDevices
→ List<
BluetoothDevice> -
Retrieve a list of devices currently connected to your app
no setter
-
connectedSystemDevices
→ Future<
List< BluetoothDevice> > -
no setter
- events → BluetoothEvents
-
Get access to all device event streams
final
- instance → void
-
no setter
-
isAvailable
→ Future<
bool> -
no setter
-
isOn
→ Future<
bool> -
Checks if Bluetooth functionality is turned on
no setter
-
isScanning
→ Stream<
bool> -
returns whether we are scanning as a stream
no setter
- isScanningNow → bool
-
are we scanning right now?
no setter
-
isSupported
→ Future<
bool> -
Checks whether the hardware supports Bluetooth
no setter
-
lastScanResults
→ List<
ScanResult> -
the most recent scan results
no setter
- logLevel → LogLevel
-
//////////////
no setter
-
name
→ Future<
String> -
no setter
-
onScanResults
→ Stream<
List< ScanResult> > -
This is the same as scanResults, except:
no setter
-
scanResults
→ Stream<
List< ScanResult> > -
a stream of scan results
no setter
-
state
→ Stream<
BluetoothAdapterState> -
no setter
-
systemDevices
→ Future<
List< BluetoothDevice> > -
Retrieve a list of devices currently connected to the system
no setter
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
-
scan(
) → Stream< ScanResult> -
setLogLevel(
LogLevel level, {dynamic color = true}) → Future< void> - Sets the internal FlutterBlue log level
-
setOptions(
{bool showPowerAlert = true}) → 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, AndroidScanMode androidScanMode = AndroidScanMode.lowLatency, bool androidUsesFineLocation = false}) → 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
-
turnOff(
{int timeout = 10}) → Future< void> - Turn off Bluetooth (Android only),
-
turnOn(
{int timeout = 60}) → Future< void> - Turn on Bluetooth (Android only),