Fix type error found by dartanalyzer --strong

We were declaring that the function passed to setState should return a
Function. In reality, we want the function to return void (and everyone calls
it with a function that returns void).
This commit is contained in:
Adam Barth
2015-07-21 22:42:04 -07:00
parent 9ee93ebad8
commit bb8b9c611c

View File

@@ -585,7 +585,7 @@ abstract class StatefulComponent extends Component {
return super.syncChild(node, oldNode, slot);
}
void setState(Function fn()) {
void setState(void fn()) {
assert(!_disqualifiedFromEverAppearingAgain);
fn();
scheduleBuild();