Skip to content

Commit

Permalink
Update WidgetStatesController docs (#150081)
Browse files Browse the repository at this point in the history
Just updated the docs that mentioned the old name (`MaterialStatesController`) that now is another class. It was showing in the [docs website](https://api.flutter.dev/flutter/widgets/WidgetStatesController-class.html) with the deprecated line-through style so I noticed it.
  • Loading branch information
FMorschel authored Jun 12, 2024
1 parent 04dc553 commit 0c692b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/flutter/lib/src/widgets/widget_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ class WidgetStatePropertyAll<T> implements WidgetStateProperty<T> {
/// or loses the focus it will [update] its controller's [value] and
/// notify listeners of the change.
///
/// When calling `setState` in a [MaterialStatesController] listener, use the
/// When calling `setState` in a [WidgetStatesController] listener, use the
/// [SchedulerBinding.addPostFrameCallback] to delay the call to `setState` after
/// the frame has been rendered. It's generally prudent to use the
/// [SchedulerBinding.addPostFrameCallback] because some of the widgets that
/// depend on [MaterialStatesController] may call [update] in their build method.
/// depend on [WidgetStatesController] may call [update] in their build method.
/// In such cases, listener's that call `setState` - during the build phase - will cause
/// an error.
///
Expand Down

0 comments on commit 0c692b8

Please sign in to comment.