Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void _sendOnMessageToBluetooth() {
- bluetooth.isConnected.then((isConnected) {
- if (isConnected) {
- bluetooth.write(“1”);
- show(‘Device Turned On’);
- }
- });
- }
- void _sendOffMessageToBluetooth() {
- bluetooth.isConnected.then((isConnected) {
- if (isConnected) {
- bluetooth.write(“0”);
- show(‘Device Turned Off’);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement