Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. //Cria lista para mostrar os dispositivos em um menu DropDown
  2. List<DropdownMenuItem<BluetoothDevice>> _getDeviceItems() {
  3. List<DropdownMenuItem<BluetoothDevice>> items = [];
  4. if (_devicesList.isEmpty) {
  5. items.add(DropdownMenuItem(
  6. child: Text(‘NONE’),
  7. ));
  8. } else {
  9. _devicesList.forEach((device) {
  10. items.add(DropdownMenuItem(
  11. child: Text(device.name),
  12. value: device,
  13. ));
  14. });
  15. }
  16. return items;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement