flex_dropdown 0.1.0 copy "flex_dropdown: ^0.1.0" to clipboard
flex_dropdown: ^0.1.0 copied to clipboard

This package enables you to easily implement dropdowns with custom styling, animations, and data sources to match your app's needs.

Custom Drop Down pub package #

Create elegant and customizable dropdowns effortlessly with the Custom Drop Down package. This Flutter package enables you to easily implement dropdowns with custom styling, animations, and data sources to match your app's needs.

https://github.com/Snapp-X/custom_drop_down/assets/47558577/2c99d33b-f631-4a01-9c29-08475af363af

Getting Started #

If you're interested in the background story behind this package's development, you can read our article on Medium: Creating Custom Dropdowns with OverlayPortal in Flutter.

To get started with the Custom Drop Down package, ensure you have Flutter installed and a basic understanding of how Flutter packages work. You can follow the instructions below to integrate the package into your project:

  • Add the following line to your pubspec.yaml file:
dependencies:
  flex_dropdown: ^0.1.0  
  • Run the following command to fetch the package:
flutter pub get
  • Import the package in your Dart code:
import 'package:flex_dropdown/flex_dropdown.dart';

Usage #

Here's a simple example showcasing the usage of the Custom Drop Down package:

  final OverlayPortalController _controller = OverlayPortalController();

  @override
  Widget build(BuildContext context) {
    return RawCustomDropDown(
      controller: _controller,
      buttonBuilder: (context, onTap) {
        return ButtonWidget(
          width: 500,
          onTap: onTap,
        );
      },
      menuBuilder: (context, width) {
        return Padding(
          padding: const EdgeInsets.only(top: 4),
          child: MenuWidget(
            width: width,
            onItemTap: () {
              _controller.hide();
            },
          ),
        );
      },
    );
  }

For a complete example, you can explore the code in the example folder of the repository.

Additional information #

If you encounter any issues, have suggestions, or want to contribute to the package, feel free to open an issue or submit a pull request on the GitHub repository.

We value community feedback and aim to provide timely responses to any queries or concerns you may have.

9
likes
0
pub points
85%
popularity

Publisher

verified publishersnappx.io

This package enables you to easily implement dropdowns with custom styling, animations, and data sources to match your app's needs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flex_dropdown