AhmedLSayed9 / dropdown_button2

Flutter's core Dropdown Button widget with steady dropdown menu and many other features.
https://pub.dev/packages/dropdown_button2
MIT License
264 stars 122 forks source link

barrierCoversButton: false property not working #284

Open chaos123x opened 3 months ago

chaos123x commented 3 months ago

The barrierCoversButton not removes overlaying barrier from the dropDownMenu, so any other widgets can't be tapped while the menu is expanded. Doctor: ✓] Flutter (Channel stable, 3.22.0, on macOS 13.6.6 22G630 darwin-x64, locale ru-UA) • Flutter version 3.22.0 on channel stable at /Users/chaos/dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5dcb86f68f (3 weeks ago), 2024-05-09 07:39:20 -0500 • Engine revision f6344b75dc • Dart version 3.4.0 • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/chaos/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 15C65 • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1) • IntelliJ at /Applications/IntelliJ IDEA.app • Flutter plugin version 79.0.3 • Dart plugin version 241.15845

[✓] VS Code (version 1.89.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.88.0

[✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 13.6.6 22G630 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.112

[✓] Network resources • All expected network resources are available.

• No issues found! exit code 0 Plugin version: dropdown_button2 3.0.0-beta.16 (from pub.dev) Code:

class DashboardScreen extends StatelessWidget {
  const DashboardScreen({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorName.white,
      body: Center(
          child: Column(
        children: [
          IconButton(
              onPressed: () {
                print('a');
              },
              icon: Icon(Icons.abc)),
          DropdownButton2(
            barrierDismissible: false,
            barrierCoversButton: false,
            dropdownStyleData: DropdownStyleData(useRootNavigator: false),
            buttonStyleData: ButtonStyleData(),

            items: [
            DropdownItem(
              child: Text('1'),
              value: '1',
            )
          ], onChanged: (v) {})
        ],
      )),
    );
  }
}

Here's the video sample. https://github.com/AhmedLSayed9/dropdown_button2/assets/55855946/0781cf06-319d-4259-a45b-10938c6d759c