Commit 302640a3 authored by Adam Barth's avatar Adam Barth

Improve the sample code for createState

The previous sample code isn't a common (or recommended) pattern.
parent 7a2c38ab
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment