Created
March 4, 2019 17:53
-
-
Save sbis04/dc74c1b373685f76d4ee0a33c4840acc to your computer and use it in GitHub Desktop.
_getDeviceItems( ) method
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
... | |
// Create the List of devices to be shown in Dropdown Menu | |
List<DropdownMenuItem<BluetoothDevice>> _getDeviceItems() { | |
List<DropdownMenuItem<BluetoothDevice>> items = []; | |
if (_devicesList.isEmpty) { | |
items.add(DropdownMenuItem( | |
child: Text('NONE'), | |
)); | |
} else { | |
_devicesList.forEach((device) { | |
items.add(DropdownMenuItem( | |
child: Text(device.name), | |
value: device, | |
)); | |
}); | |
} | |
return items; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment