Created
July 18, 2024 09:57
-
-
Save mdjastrzebski/d4ca1c9c3a1e057fb928161e31069388 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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