package

dev.flutter.example

import

io.flutter.embedding.android.FlutterActivity

import

io.flutter.embedding.engine.FlutterEngine

class

MainActivity

FlutterActivity

()

override

fun

configureFlutterEngine

flutterEngine

FlutterEngine

flutterEngine

platformViewsController

registry

registerViewFactory

"<platform-view-type>"

NativeViewFactory

())

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

package

dev.flutter.plugin.example

import

io.flutter.embedding.engine.plugins.FlutterPlugin