initNotification static method
Initialize package's notification config: navigatorKey
, channelKey
, channelName
, channelDes
, channelGroupKey
params
for showing notification purpose.
channelKey
notification channel keychannelName
notification channel namechannelDes
notification channel descriptionchannelGroupKey
notification channel group keynavigatorKey
App global navigator key
Implementation
static Future<bool> initNotification(GlobalKey<NavigatorState> navigatorKey,
String channelKey, String channelName, String channelDes,
{String? channelGroupKey, bool autoRequestPermission = true}) async {
WidgetsFlutterBinding.ensureInitialized();
EHttpInspector.navigatorKey = navigatorKey;
return await NotificationUtil.init(channelKey, channelName, channelDes,
channelGroupKey: channelGroupKey,
autoRequestPermission: autoRequestPermission);
}