initializeMethodCall static method
Initialize the callbacks from the native side to dart. @param onAppEnterForeground Function that needs to be called when the app enters foreground.
Implementation
static Future<void> initializeMethodCall({
required VoidCallback? onAppEnterForeground,
}) async {
if (!_methodCallInitialized) {
_methodCallInitialized = true;
_channel.setMethodCallHandler(_mbmessagesHandler);
MBMessagesPlugin.onAppEnterForeground = onAppEnterForeground;
}
}