scan method

Future<void> scan()

Starts scanning for BLE devices.

Implementation

Future<void> scan() async {
  try {
    await _channel.invokeMethod('scan');
  } on PlatformException catch (e) {
    throw Exception('Failed to start scan: ${e.message}');
  }
}