From dff3e4ae3b1be540a77186701b7f84d2e6dd0dfd Mon Sep 17 00:00:00 2001 From: Ahmed Elsayed Date: Sat, 28 Oct 2023 19:08:38 +0200 Subject: [PATCH] Ensure disposing ValueNotifiers --- packages/dropdown_button2/lib/src/dropdown_button2.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/dropdown_button2/lib/src/dropdown_button2.dart b/packages/dropdown_button2/lib/src/dropdown_button2.dart index e1bc82f..8462b7e 100644 --- a/packages/dropdown_button2/lib/src/dropdown_button2.dart +++ b/packages/dropdown_button2/lib/src/dropdown_button2.dart @@ -420,6 +420,8 @@ class DropdownButton2State extends State> WidgetsBinding.instance.removeObserver(this); _removeDropdownRoute(); _internalNode?.dispose(); + _isMenuOpen.dispose(); + _rect.dispose(); super.dispose(); }