diff --git a/packages/flutter/lib/src/material/ink_well.dart b/packages/flutter/lib/src/material/ink_well.dart index 29dfe58d5b37..1f93c8600d51 100644 --- a/packages/flutter/lib/src/material/ink_well.dart +++ b/packages/flutter/lib/src/material/ink_well.dart @@ -847,6 +847,7 @@ class _InkResponseState extends State<_InkResponseStateWidget> void dispose() { FocusManager.instance.removeHighlightModeListener(handleFocusHighlightModeChange); statesController.removeListener(handleStatesControllerChange); + internalStatesController?.dispose(); super.dispose(); } diff --git a/packages/flutter/lib/src/widgets/scroll_position.dart b/packages/flutter/lib/src/widgets/scroll_position.dart index 88b612d695f3..412179b0dab5 100644 --- a/packages/flutter/lib/src/widgets/scroll_position.dart +++ b/packages/flutter/lib/src/widgets/scroll_position.dart @@ -976,6 +976,7 @@ abstract class ScrollPosition extends ViewportOffset with ScrollMetrics { void dispose() { activity?.dispose(); // it will be null if it got absorbed by another ScrollPosition _activity = null; + isScrollingNotifier.dispose(); super.dispose(); }