moyoung_ble_plugin 0.0.2 moyoung_ble_plugin: ^0.0.2 copied to clipboard
A Flutter plugin for communicating with the watch.
MoYoung Ble Plugin #
Welcome to use this plugin. This is a Flutter plugin for communicating with the watch.
Platform Support #
Android | iOS |
---|---|
✔️ | ✔️ |
Usage #
To use this plugin, add moyoung_ble_plugin
as a dependency in your pubspec.yaml
file.
moyoung_ble_plugin: ^x.x.x
Example #
// Import package
import 'package:moyoung_ble_plugin/moyang_ble.dart';
// Instantiate it
final MoyangBle _blePlugin = MoyangBle();
// Access current watch version
FirmwareVersionInfo versionInfo = await _blePlugin.checkFirmwareVersion();
print(versionInfo.version);
// Be informed when the connection state changes
_blePlugin.connStateEveStm.listen(
(EventConnState event) {
// Do something with new state
}
);