v1.1.3
bluetoothadapter
Flutterプラグインで、**Android専用**のBluetoothアダプター機能を公開します。
22いいね 6330日間ダウンロード40Pub ポイント
プラットフォーム情報なし
GeekyAnts/flutter-bluetooth-adapter open-source repository details.
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
A Flutter plugin to expose the features of Bluetooth Adapter for Android only.
The primary purpose of this project was to communicate between flutter and Rasburry Pie using Bluetooth.
For a full example please check /example folder. Here are only the most important parts of the code to illustrate how to use the library.
//Initiatinng the bluetooth adapter
Bluetoothadapter flutterbluetoothadapter = Bluetoothadapter();
//Listening to the connection status listener
String _connectionStatus = "NONE";
StreamSubscription _btConnectionStatusListener =flutterbluetoothadapter.connectionStatus().listen((dynamic status) {
setState(() {
_connectionStatus = status.toString();
});
});
//Listening to the recieved messages
String _recievedMessage;
StreamSubscription _btReceivedMessageListener = flutterbluetoothadapter.receiveMessages().listen((dynamic newMessage) {
setState(() {
_recievedMessage = newMessage.toString();
});
});
List<BtDevice> devices = await flutterbluetoothadapter.getDevices();
await flutterbluetoothadapter.getDevice(deviceAddress);
await flutterbluetoothadapter.startServer();
flutterbluetoothadapter.startClient(devices.indexOf(element), true);
flutterbluetoothadapter.sendMessage(messageString);
await flutterbluetoothadapter.checkBluetooth(); //returns bool
flutterbluetoothadapter.initBlutoothConnection(uuid);
依存関係一覧 2 件
{"sdk":"flutter"}{"sdk":"flutter"}用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗