Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mdjastrzebski/d4ca1c9c3a1e057fb928161e31069388 to your computer and use it in GitHub Desktop.
Save mdjastrzebski/d4ca1c9c3a1e057fb928161e31069388 to your computer and use it in GitHub Desktop.
package com.example.flutter_brownfield_app
import android.content.Context
import io.flutter.plugin.common.StandardMessageCodec
import io.flutter.plugin.platform.PlatformView
import io.flutter.plugin.platform.PlatformViewFactory
/**
* This is a Flutter PlatformViewFactory for creating instances of ReactView.
*/
class ReactViewFactory : PlatformViewFactory(StandardMessageCodec.INSTANCE) {
override fun create(context: Context, viewId: Int, args: Any?): PlatformView {
val creationParams = args as Map<String?, Any?>?
return ReactView(context, viewId, creationParams)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment