flutter GeneratedPluginRegistrant.registerWith(this) cannot be converted to FlutterEngine code example

Example: PluginRegistry cannot be converted to FlutterEngine GeneratedPluginRegistrant.registerWith(registry)

import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;
//replace GeneratedPluginRegistrant.registerWith(registry); with below
FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));

Tags:

Misc Example