flutter/packages
Taha Tesser a603a17875
Update MaterialStatesController docs for calling setState in a listener (#143453)
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.
2024-02-16 07:43:50 +00:00
..
flutter Update MaterialStatesController docs for calling setState in a listener (#143453) 2024-02-16 07:43:50 +00:00
flutter_driver Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
flutter_goldens Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
flutter_localizations Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
flutter_test Reland simulatedAccessibilityTraversal fix (#143527) 2024-02-15 21:37:40 +00:00
flutter_tools Reland "Disentangle and align flutter build web --wasm flags (#143517)" (#143549) 2024-02-16 00:19:38 +00:00
flutter_web_plugins Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
fuchsia_remote_debug_protocol Upgrade leak_tracker. (#143236) 2024-02-09 14:41:22 -08:00
integration_test Update dependencies in integration test (#143111) 2024-02-13 20:29:35 +00:00
analysis_options.yaml Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00