In other words, plugins using the old API might produce undefined
behaviors when embedding Flutter into an Android app.
Most of the Flutter plugins provided by the flutter.dev
team have been migrated already. (Learn how to become a
verified publisher on pub.dev!) For an example of
a plugin that uses the new APIs, see the
battery plus package.

Upgrade steps

The following instructions outline the steps for supporting the new API:

Update the main plugin class (*Plugin.java) to implement the
FlutterPlugin interface. For more complex plugins,
you can separate the FlutterPlugin and MethodCallHandler
into two classes. See the next section, Basic plugin,
for more details on accessing app resources with
the latest version (v2) of embedding.