close

PluginRegistry cannot be converted to FlutterEngine In Flutter

Hello Guys How Are you all? hope you all are fine. today when I updated my flutter version, suddenly I got the following error: “error: incompatible types: PluginRegistry cannot be converted to FlutterEngine GeneratedPluginRegistrant.registerWith (registry); ” from firebase_messaging plugin.

How PluginRegistry cannot be converted to FlutterEngine In Flutter Error Occurs?

I Got This Error From firebase_messaging plugin

error: incompatible types: PluginRegistry cannot be converted to FlutterEngine
    GeneratedPluginRegistrant.registerWith(registry);

Line where I Got This Error

  public void registerWith(PluginRegistry registry) {
    GeneratedPluginRegistrant.registerWith(registry);
  }

How to solve PluginRegistry cannot be converted to FlutterEngine In Flutter?

  1. How to solve PluginRegistry cannot be converted to FlutterEngine In Flutter?

    to solve PluginRegistry cannot be converted to FlutterEngine In Flutter Replace this code line: GeneratedPluginRegistrant.registerWith(registry); with this: FirebaseMessagingPlugin.registerWith(registry.registrarFor(“io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin”));

  2. PluginRegistry cannot be converted to FlutterEngine In Flutter

    to solve PluginRegistry cannot be converted to FlutterEngine In Flutter Replace this code line: GeneratedPluginRegistrant.registerWith(registry); with this: FirebaseMessagingPlugin.registerWith(registry.registrarFor(“io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin”));

Solution 1: Just replace this line

Replace this code line:

GeneratedPluginRegistrant.registerWith(registry);

with this:

FirebaseMessagingPlugin.registerWith(registry.registrarFor("io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin"));

Make sure to import:

import io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin;

This Solution is Worked For Me. Hope its work for you as well. here is Git Issue Defined #1904

Summery

So it’s all About Converting TimeStamp in Flutter, Flutter Date time to Timestamp. Hope this tutorial helped you a lot. Comment below Your thoughts and your queries. And Also Comment on your suggestion here.

Also Check Out Below Tutorials

Leave a Comment

%d bloggers like this: