Тэги:
#flutter #flutterio #dartio #development #tutorial #How-to #stateful #widgetКомментарии:
This is an incomplete tutorial. Almost equal to the text written in intro of stateful widget. no info
Ответитьsorry, but this is the worst example to build an StatefulWidget. You can do this example doing StatelessWidget:
class FirstApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final wordPair = new WordPair.random();
return MaterialApp(
title: 'hello world',
home: new Scaffold(
appBar: AppBar(
title: new Text('helloada world'),
),
body: new Center(
child: new Text(wordPair.asPascalCase),
),
),
);
}
}
worst you don't mention how to install external package english_words, but you use it.
If someone is starting to learn flutter it will be very confused.
What about setState? How does this work?
Ответить