BluetoothOptions class
Constructors
- BluetoothOptions({ScanFilter? scanFilter, bool requireLocationServicesEnabled = true, Duration maxScanDuration = const Duration(milliseconds: 30000), Duration prescanDuration = const Duration(seconds: 5), Duration connectionTimeout = const Duration(seconds: 2)})
Properties
- connectionTimeout → Duration
-
If connectionTimeout parameter is supplied and a connection is not
established before connectionTimeout expires, the pending connection
attempt will be cancelled and a TimeoutException error will be emitted
into the returned stream.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxScanDuration → Duration
-
The maxScanDuration is the maximum amount of time BLE discovery should
run in order to find nearby devices.
final
- prescanDuration → Duration
-
The prescanDuration is the amount of time BLE discovery should run in
order to find the device before connecting.
final
- requireLocationServicesEnabled → bool
-
requireLocationServicesEnabled specifies whether to check if location
services are enabled before scanning.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scanFilter → ScanFilter
-
The scanFilter is the filter used to scan for devices.
final
Methods
-
copyWith(
{ScanFilter scanFilter()?, bool requireLocationServicesEnabled()?, Duration maxScanDuration()?, Duration prescanDuration()?, Duration connectionTimeout()?, int mtu()?}) → BluetoothOptions -
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