drop_down_list_menu 0.0.9

SDKflutter
Platformandroidioswindowslinuxmacosweb

The "Drop-Down Menu" package is a Flutter package that provides a user-friendly interface for selecting options from a drop-down menu.

Drop-Down-Menu pub package

The "Drop-Down Menu" package is a Flutter package that provides a user-friendly interface for selecting options from a drop-down menu. This package is designed to be aesthetically pleasing and highly customizable, allowing developers to create a drop-down menu that perfectly fits the look and feel of their app. So, if you want to provide your users with a beautiful and functional drop-down menu, this package is the perfect solution!

Screenshots

Usage

To use this package, add drop_down_menu as a dependency in your pubspec.yaml file.

Example

import 'package:drop_down_list_menu/drop_down.dart';

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}


class _ExampleState extends State<Example> {
  List<String> _list = ['One', 'Two', 'Three', 'Four', 'Five'];
  String _selectedItem = 'One';

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Drop Down Menu'),
      ),
      body: Center(
        child: DropDownMenu(
          title: 'Select an item',
          enabled: false,
          values: _list,
            value: _selectedItem,
              onChanged: (value) {
              setState(() {
                _selectedItem = value!;
              });
            },
          ),
      ),
    );
  }
}

Parameters

ParameterTypeDescription
valuesListList of items to be displayed in the drop-down menu.
valueStringThe currently selected item.
onChangedvoid Function(String?)Callback function that is called when an item is selected.
titleString?The title of the drop-down menu.
enabledbool?If false, the drop-down menu will be disabled.
themeFontbool?The font of the drop-down menu and title should be of project theme or default

Github Repository

Drop-Down-Menu

Author

Shubham Kumar - Github