extends

FlutterActivity

@Override

public

void

configureFlutterEngine

@NonNull

FlutterEngine

flutterEngine

flutterEngine

getPlatformViewsController

()

getRegistry

()

registerViewFactory

"<platform-view-type>"

new

NativeViewFactory

());

For plugin registration,
modify the plugin’s main file
(for example, PlatformViewPlugin.java):

package

dev.flutter.plugin.example

import

androidx.annotation.NonNull

import

io.flutter.embedding.engine.plugins.FlutterPlugin

public

class

PlatformViewPlugin