Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. void _sendOnMessageToBluetooth() {
  2. bluetooth.isConnected.then((isConnected) {
  3. if (isConnected) {
  4. bluetooth.write(“1”);
  5. show(‘Device Turned On’);
  6. }
  7. });
  8. }
  9.  
  10. void _sendOffMessageToBluetooth() {
  11. bluetooth.isConnected.then((isConnected) {
  12. if (isConnected) {
  13. bluetooth.write(“0”);
  14. show(‘Device Turned Off’);
  15. }
  16. });
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement