v1.1.3
bluetoothadapter
**안드로이드 전용**으로 블루투스 어댑터 기능을 노출하는 플러터 플러그인입니다.
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 ↗