ErrorSummary('setState() or markNeedsBuild() called during build.'),
ErrorDescription(
...
...
@@ -4547,10 +4533,7 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
information.add(owner!._debugCurrentBuildTarget!.describeWidget('The widget which was currently being built when the offending call was made was'));
}
throwFlutterError.fromParts(information);
}
assert(dirty);// can only get here if we're not in scope, but ignored calls are allowed, and our call would somehow be ignored (since we're already dirty)
}elseif(owner!._debugStateLocked){
assert(!_debugAllowIgnoredCallsToMarkNeedsBuild);
throwFlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('setState() or markNeedsBuild() called when widget tree was locked.'),
ErrorDescription(
...
...
@@ -4868,7 +4851,6 @@ abstract class ComponentElement extends Element {