How to use some flutter plugin as a dependency to a flutter package and use this package in my flutter app?

Issue

I am trying to make a single package for dealing with permissions and data flow for this I have used different plugins and packages as a dependency on this package. But some plugins throw errors of missing plugin exception.

Does anyone know the reason behind it? It’s working fine before flutter version 3.0. But not working now.

Solution

The issue is with flutter activity binding.
I solved it by doing these steps.

  1. Go to your_app/android/app/src/main/AndroidManifest.xml
  2. Search for activity tag.
  3. Change android:name=".MainActivity" to android:name="io.flutter.embedding.android.FlutterActivity"

This will solve the issue.

Answered By – Shivam Modi

Answer Checked By – Pedro (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *