Created
March 4, 2019 17:00
-
-
Save sbis04/26e6223e13dc7c2ce0c8eca5f8021fa8 to your computer and use it in GitHub Desktop.
BluetoothApp class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BluetoothApp extends StatefulWidget { | |
| @override | |
| _BluetoothAppState createState() => _BluetoothAppState(); | |
| } | |
| class _BluetoothAppState extends State<BluetoothApp> { | |
| // Initializing a global key, as it would help us in showing a SnackBar later | |
| final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); | |
| // Get the instance of the bluetooth | |
| FlutterBluetoothSerial bluetooth = FlutterBluetoothSerial.instance; | |
| // Define some variables, which will be required later | |
| List<BluetoothDevice> _devicesList = []; | |
| BluetoothDevice _device; | |
| bool _connected = false; | |
| bool _pressed = false; | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| // We have to work on the UI in this part | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment