Step 2a: Define the package API (.dart)

The API of the plugin package is defined in Dart code.
Open the main hello/ folder in your favorite Flutter editor.
Locate the file lib/hello.dart.

Step 2b: Add Android platform code (.kt/.java)

We recommend you edit the Android code using Android Studio.

Then use the following steps:

Launch Android Studio.

Select Open an existing Android Studio Project
in the Welcome to Android Studio dialog,
or select File > Open from the menu,
and select the hello/example/android/build.gradle file.

In the Gradle Sync dialog, select OK.

In the Android Gradle Plugin Update dialog,
select Don’t remind me again for this project.

The Android platform code of your plugin is located in
hello/java/com.example.hello/HelloPlugin.