drop_down_list_menu 0.0.2 copy "drop_down_list_menu: ^0.0.2" to clipboard
drop_down_list_menu: ^0.0.2 copied to clipboard

A package for creating beautiful drop down menus.

Drop-Down-Menu pub package #

A Flutter package that provides a beautiful and customizable drop-down menu.

Screenshots #

Screenshot 1

Usage #

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

Example #

import 'package:drop_down_menu/drop_down_menu.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(
          list: _list,
          selectedItem: _selectedItem,
          onItemSelected: (item) {
            setState(() {
              _selectedItem = item;
            });
          },
        ),
      ),
    );
  }
}

Parameters #

Parameter Type Description
values List List of items to be displayed in the drop-down menu.
value String The currently selected item.
onChanged void Function(String?) Callback function that is called when an item is selected.
title String? The title of the drop-down menu.
disable bool? If true, the drop-down menu will be disabled.

Github Repository #

Drop-Down-Menu

Author #

Shubham Kumar - Github

2
likes
0
pub points
58%
popularity

Publisher

unverified uploader

A package for creating beautiful drop down menus.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on drop_down_list_menu