creationParams

Map

String

Object

>)

args

return

new

NativeView

context

id

creationParams

);

Finally, register the platform view.
You can do this in an app or a plugin.

For app registration,
modify the app’s main activity
(for example, MainActivity.java):

package

dev.flutter.example

import

androidx.annotation.NonNull

import

io.flutter.embedding.android.FlutterActivity

import

io.flutter.embedding.engine.FlutterEngine

public

class

MainActivity

extends

FlutterActivity

@Override