Improve the sample code for createState

The previous sample code isn't a common (or recommended) pattern.
This commit is contained in:
Adam Barth 2016-02-16 11:09:23 -08:00
parent 7a2c38abc8
commit 302640a391

View File

@ -274,7 +274,7 @@ abstract class StatefulComponent extends Widget {
/// override this to return a new instance of the State class associated with
/// this StatefulComponent class, like this:
///
/// MyState createState() => new MyState(this);
/// _MyState createState() => new _MyState();
State createState();
}