Skip to content

Commit 1a05b8a

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 7955780 commit 1a05b8a

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
@@ -1474,6 +1474,9 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
14741474
/// this method because they need to do some expensive work (e.g., network
14751475
/// fetches) when their dependencies change, and that work would be too
14761476
/// expensive to do for every build.
1477+
///
1478+
/// Implementations of this method should start with a call to the inherited
1479+
/// method, as in `super.didChangeDependencies()`.
14771480
@protected
14781481
@mustCallSuper
14791482
void didChangeDependencies() {}

0 commit comments

Comments
 (0)