Commit bb8b9c61 authored by Adam Barth's avatar Adam Barth

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).
parent 9ee93eba
......@@ -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();
......
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