onRequestPermissions method
Callback on requestPermissions.
Is to be overridden in sub-classes for device-specific permission handling.
Implementation
@override
@mustCallSuper
Future<void> onRequestPermissions() async {
if (Platform.isAndroid) {
await Permission.bluetoothScan.request();
await Permission.bluetoothConnect.request();
}
if (Platform.isIOS) {
await Permission.bluetooth.request();
}
}