Make TabController communicating creation in constructor. (#144912)

Contributes to https://github.com/flutter/flutter/issues/144910
This commit is contained in:
Polina Cherkasova 2024-03-11 16:13:47 -07:00 committed by GitHub
parent 91cccc8e6b
commit e66811ae04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -132,7 +132,11 @@ class TabController extends ChangeNotifier {
}) : _index = index,
_previousIndex = previousIndex,
_animationController = animationController,
_animationDuration = animationDuration;
_animationDuration = animationDuration {
if (kFlutterMemoryAllocationsEnabled) {
ChangeNotifier.maybeDispatchObjectCreation(this);
}
}
/// Creates a new [TabController] with `index`, `previousIndex`, `length`, and