mirror of
https://github.com/flutter/flutter
synced 2024-08-24 18:36:03 +00:00
![]() fixes [Calling `setState` in a `MaterialStatesController` listener and `MaterialStateController.update` causes Exception](https://github.com/flutter/flutter/issues/138986) ### Description `MaterialStatesController` listener calls `setState` during build when `MaterialStatesController.update` listener calls `notifyListeners`. I tried fixing this issue by putting `notifyListeners` in a post-frame callback. However, this breaks existing customer tests (particularly super editor tests). A safer approach would be to document that the listener's `setState` call should be in a post-frame callback to delay it and not call this during the build phase triggered by the `MaterialStatesController.update` in the widgets such as InkWell or buttons. |
||
---|---|---|
.. | ||
flutter | ||
flutter_driver | ||
flutter_goldens | ||
flutter_localizations | ||
flutter_test | ||
flutter_tools | ||
flutter_web_plugins | ||
fuchsia_remote_debug_protocol | ||
integration_test | ||
analysis_options.yaml |