Skip to content

Instantly share code, notes, and snippets.

@felangel
Created September 7, 2018 05:44
Show Gist options
  • Save felangel/c2fea29b0362b9c491e32710186e1e7a to your computer and use it in GitHub Desktop.
Save felangel/c2fea29b0362b9c491e32710186e1e7a to your computer and use it in GitHub Desktop.
[platform_views] TextViewFactory
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