Skip to content

Commit e90043d

Browse files
committed
Document super call order for State.didChangeDependencies
Mirror the guidance already present on State.initState so overrides know to start with super.didChangeDependencies(). Doc-only change. Fixes flutter#28925.
1 parent d776076 commit e90043d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎packages/flutter/lib/src/widgets/framework.dart‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,9 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
14771477
/// this method because they need to do some expensive work (e.g., network
14781478
/// fetches) when their dependencies change, and that work would be too
14791479
/// expensive to do for every build.
1480+
///
1481+
/// Implementations of this method should start with a call to the inherited
1482+
/// method, as in `super.didChangeDependencies()`.
14801483
@protected
14811484
@mustCallSuper
14821485
void didChangeDependencies() {}

0 commit comments

Comments
 (0)