Fixed -> DropdownMenu throws exception when it is in any scrollable l… (#140566)

Fixed -> DropdownMenu throws exception when it is in any scrollable list view and scrolls quickly #139871
This commit is contained in:
Faisal Ansari
2024-03-08 02:16:03 +05:30
committed by GitHub
parent 487d42f9ee
commit 874804e511
2 changed files with 31 additions and 0 deletions

View File

@@ -493,6 +493,9 @@ class _DropdownMenuState<T> extends State<DropdownMenu<T>> {
void refreshLeadingPadding() {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) {
return;
}
setState(() {
leadingPadding = getWidth(_leadingKey);
});