Created
September 7, 2018 05:44
-
-
Save felangel/c2fea29b0362b9c491e32710186e1e7a to your computer and use it in GitHub Desktop.
[platform_views] TextViewFactory
This file contains 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 angelov.felix.textview; | |
import android.content.Context; | |
import io.flutter.plugin.common.BinaryMessenger; | |
import io.flutter.plugin.common.StandardMessageCodec; | |
import io.flutter.plugin.platform.PlatformView; | |
import io.flutter.plugin.platform.PlatformViewFactory; | |
public class TextViewFactory extends PlatformViewFactory { | |
private final BinaryMessenger messenger; | |
public TextViewFactory(BinaryMessenger messenger) { | |
super(StandardMessageCodec.INSTANCE); | |
this.messenger = messenger; | |
} | |
@Override | |
public PlatformView create(Context context, int id, Object o) { | |
return new FlutterTextView(context, messenger, id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment