I am using flutter for web. When I click on the dropdown but do not select any options, then when I click outside the dropdown menu, the focus is still there. But I have used Gesture Detector
to change the focus by this-
onTap: () {
FocusManager.instance.primaryFocus?.unfocus();
},
So whenever I click outside the dropdown, the focus needs to be changed. But it is not functioning.
Flutter doctor output:
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1.1)
[✓] VS Code (version 1.67.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
• No issues found!