Rename ComponentState and use initState().

ComponentState becomes State, for brevity.
Instead of overriding its constructor, override initState().
This makes writing States much simpler.
This commit is contained in:
Hixie
2015-09-24 15:45:47 -07:00
parent 7dd26a7a5a
commit c3b3b71bed
34 changed files with 167 additions and 162 deletions

View File

@@ -10,8 +10,9 @@ class ProgressIndicatorApp extends StatefulComponent {
ProgressIndicatorAppState createState() => new ProgressIndicatorAppState(this);
}
class ProgressIndicatorAppState extends ComponentState<ProgressIndicatorApp> {
ProgressIndicatorAppState(ProgressIndicatorApp config) : super(config) {
class ProgressIndicatorAppState extends State<ProgressIndicatorApp> {
void initState(BuildContext context) {
super.initState(context);
valueAnimation = new ValueAnimation<double>()
..duration = const Duration(milliseconds: 1500)
..variable = new AnimatedValue<double>(