MethodChannelBluetoothSerial class

Implementação do canal de comunicação via MethodChannel entre o Flutter e o código nativo Android.

Esta classe traduz chamadas Dart para métodos Kotlin usando o canal "bluetooth_serial_android".

Inheritance

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

connect(String address, {String uuid = "00001101-0000-1000-8000-00805F9B34FB", int timeoutMs = 200}) Future<bool>
Conecta a um dispositivo Bluetooth usando o MAC Address informado.
override
disconnect() Future<void>
Encerra a conexão Bluetooth atual, liberando recursos.
override
ensurePermissions() Future<bool>
Verifica e solicita permissões necessárias para uso do Bluetooth.
override
getPairedDevices() Future<List<Map<String, String>>>
Retorna a lista de dispositivos pareados com o telefone.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() Future<String?>
Lê dados recebidos do dispositivo.
override
readLine([String delimiter = "\n"]) Future<String?>
Lê uma linha completa até encontrar o delimiter.
override
scanDevices() Future<List<Map<String, String>>>
Realiza scan por dispositivos Bluetooth próximos.
override
toString() String
A string representation of this object.
inherited
write(String message) Future<void>
Envia texto ao dispositivo conectado via Bluetooth.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited