selectDevice static method

Future<BluetoothDevice?> selectDevice(
  1. BuildContext context
)

Implementation

static Future<BluetoothDevice?> selectDevice(BuildContext context) async {
  final selected = await showModalBottomSheet(
    context: context,
    builder: (context) => BluetoothDeviceSelector(//const
      onTap:(dynamic deviceIt){

      }
    ),
  );
  if (selected is BluetoothDevice) {
    return selected;
  }
  return null;
}