From e66811ae040248cac319f5bd424fb8b2dbe7908f Mon Sep 17 00:00:00 2001 From: Polina Cherkasova Date: Mon, 11 Mar 2024 16:13:47 -0700 Subject: [PATCH] Make TabController communicating creation in constructor. (#144912) Contributes to https://github.com/flutter/flutter/issues/144910 --- packages/flutter/lib/src/material/tab_controller.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/tab_controller.dart b/packages/flutter/lib/src/material/tab_controller.dart index 507b74288e86b..515ab907b249b 100644 --- a/packages/flutter/lib/src/material/tab_controller.dart +++ b/packages/flutter/lib/src/material/tab_controller.dart @@ -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