new

OnClickListener

()

@Override

public

void

onClick

View

startActivity

FlutterActivity

createDefaultIntent

currentActivity

);

});

myButton

setOnClickListener

startActivity

FlutterActivity

createDefaultIntent

this

The previous example assumes that your Dart entrypoint
is called main(), and your initial Flutter route is ‘/’.
The Dart entrypoint can’t be changed using Intent,
but the initial route can be changed using Intent.
The following example demonstrates how to launch a
FlutterActivity that initially renders a custom
route in Flutter.

Java

Kotlin

myButton

addOnClickListener

new