handleMethodCall method
Handles method calls over the MethodChannel of this plugin. Note: Check the "federated" architecture for a new way of doing this: https://flutter.dev/go/federated-plugins
Implementation
Future<dynamic> handleMethodCall(MethodCall call) async {
switch (call.method) {
case 'checkPermission':
return _checkNotificationPermission();
case 'requestPermission':
return _requestNotificationPermission();
case 'showNotification':
return _showNotification(
Map<String, dynamic>.from(call.arguments as Map));
default:
throw PlatformException(
code: 'Unimplemented',
details:
'easy_notifications for web doesn\'t implement \'${call.method}\'',
);
}
}