_ResetNotifier should communicate creation in constructor. (#133716)

This commit is contained in:
Polina Cherkasova 2023-08-31 10:18:04 -07:00 committed by GitHub
parent a14989b3bf
commit 54402ae375
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1056,6 +1056,11 @@ class DraggableScrollableActuator extends StatelessWidget {
/// A [ChangeNotifier] to use with [InheritedResetNotifier] to notify
/// descendants that they should reset to initial state.
class _ResetNotifier extends ChangeNotifier {
_ResetNotifier() {
if (kFlutterMemoryAllocationsEnabled) {
maybeDispatchObjectCreation();
}
}
/// Whether someone called [sendReset] or not.
///
/// This flag should be reset after checking it.