showNotification method

  1. @override
Future<void> showNotification(
  1. NotificationRequest request
)
override

Show a notification

Implementation

@override
Future<void> showNotification(NotificationRequest request) async {
  try {
    await methodChannel.invokeMethod<void>(
      'showNotification',
      request.toMap(),
    );
  } on PlatformException catch (e) {
    throw Exception('Failed to show notification: ${e.message}');
  }
}