Skip to content

Commit e66811a

Browse files
authored
Make TabController communicating creation in constructor. (flutter#144912)
Contributes to flutter#144910
1 parent 91cccc8 commit e66811a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/flutter/lib/src/material/tab_controller.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,11 @@ class TabController extends ChangeNotifier {
132132
}) : _index = index,
133133
_previousIndex = previousIndex,
134134
_animationController = animationController,
135-
_animationDuration = animationDuration;
135+
_animationDuration = animationDuration {
136+
if (kFlutterMemoryAllocationsEnabled) {
137+
ChangeNotifier.maybeDispatchObjectCreation(this);
138+
}
139+
}
136140

137141

138142
/// Creates a new [TabController] with `index`, `previousIndex`, `length`, and

0 commit comments

Comments
 (0)