Skip to content

Instantly share code, notes, and snippets.

@felangel felangel/main.dart
Last active Sep 7, 2018

What would you like to do?
[platform_views] TextViewExample
import 'package:flutter/material.dart';
import 'package:text_view/text_view.dart';
void main() => runApp(MaterialApp(home: TextViewExample()));
class TextViewExample extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Flutter TextView example')),
body: Column(children: [
child: Container(
padding: EdgeInsets.symmetric(vertical: 30.0),
width: 130.0,
height: 100.0,
child: TextView(
onTextViewCreated: _onTextViewCreated,
flex: 3,
child: Container(
child: Center(child: Text("Hello from Flutter!"))))
void _onTextViewCreated(TextViewController controller) {
controller.setText('Hello from Android!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.