requestPermission method
Implementation
@override
Future<bool> requestPermission() async {
if (html.Notification.supported) {
final permission = await html.Notification.requestPermission();
if (permission == 'granted') {
log('Permission granted');
return true;
} else {
log('Permission denied');
return false;
}
} else {
log('Notifications not supported');
return false;
}
}