initialize method

  1. @override
Future<void> initialize()
override

Initialize the notification plugin

Implementation

@override
Future<void> initialize() async {
  try {
    await methodChannel.invokeMethod<void>('initialize');
  } on PlatformException catch (e) {
    throw Exception('Failed to initialize: ${e.message}');
  }
}