11

Add the Flutter module as a dependency

Next, add the Flutter module as a dependency of your
existing app in Gradle. There are two ways to achieve this.
The AAR mechanism creates generic Android AARs as
intermediaries that packages your Flutter module.
This is good when your downstream app builders don’t
want to have the Flutter SDK installed. But,
it adds one more build step if you build frequently.

The source code subproject mechanism is a convenient
one-click build process, but requires the Flutter SDK.
This is the mechanism used by the Android Studio IDE plugin.

Option A - Depend on the Android Archive (AAR)

This option packages your Flutter library as a generic local
Maven repository composed of AARs and POMs artifacts.
This option allows your team to build the host app without
installing the Flutter SDK. You can then distribute the
artifacts from a local or remote repository.