MethodChannelSppConnectionPlugin class
An implementation of SppConnectionPluginPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- SppConnectionPluginPlatform
- MethodChannelSppConnectionPlugin
Constructors
Properties
- connectedDevice → BluetoothDeviceModel?
-
Get currently connected device
no setteroverride
- connectionState → BluetoothConnectionState
-
Get current connection state
no setteroverride
-
connectionStateStream
→ Stream<
BluetoothConnectionState> -
Stream of connection state changes
no setteroverride
-
dataStream
→ Stream<
Uint8List> -
Stream of incoming data
no setteroverride
-
deviceListStream
→ Stream<
List< BluetoothDeviceModel> > -
Stream of available devices
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- hexMode → bool
-
Get hex mode status
no setteroverride
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- newlineType → String
-
Get newline type
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
areNotificationsEnabled(
) → Future< bool> -
Check if notifications are enabled (Android O+)
override
-
connectToDevice(
String address) → Future< void> -
Connect to a Bluetooth device
override
-
disconnect(
) → Future< void> -
Disconnect from current device
override
-
dispose(
) → void - Dispose resources
-
enableBluetooth(
) → Future< void> -
Enable Bluetooth
override
-
getPairedDevices(
) → Future< List< BluetoothDeviceModel> > -
Get list of paired devices
override
-
getPlatformVersion(
) → Future< String?> -
override
-
hasPermissions(
) → Future< bool> -
Check if permissions are granted
override
-
isBluetoothEnabled(
) → Future< bool> -
Check if Bluetooth is enabled
override
-
isBluetoothSupported(
) → Future< bool> -
Check if Bluetooth is supported
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openBluetoothSettings(
) → Future< void> -
Open Bluetooth settings
override
-
openNotificationSettings(
) → Future< void> -
Open notification settings
override
-
requestPermissions(
) → Future< bool> -
Request Bluetooth permissions
override
-
sendData(
Uint8List data) → Future< void> -
Send data to connected device
override
-
sendHex(
String hexString) → Future< void> -
Send hex data
override
-
sendText(
String text) → Future< void> -
Send text data (with newline handling)
override
-
setHexMode(
bool enabled) → void -
Set hex mode
override
-
setNewlineType(
String newline) → void -
Set newline type
override
-
startBackgroundService(
) → Future< void> -
Start background service
override
-
stopBackgroundService(
) → Future< void> -
Stop background service
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited