decorated_dropdownbutton 0.0.3 icon indicating copy to clipboard operation
decorated_dropdownbutton: ^0.0.3 copied to clipboard

A Flutter package with advanced dropdown Button which let you give different design on DropdownButton.

Use decorated_dropdown button to add DropdownButton with decoration properties like box shadow, border, background color, border radius, gradient background, icons, and many more in Flutter App.

Features #

This package will help you to add decoration on DropdownButton

Getting started #

To start using this package, add the following lines in pubspec.yaml file.

dependencies:
  decorated_dropdownbutton: ^0.0.3

Import package in your script:

import 'package:decorated_dropdownbutton/decorated_dropdownbutton.dart';

Usage #

You can use DecoratedDropdownButton() like below:

DecoratedDropdownButton(
    value: "item1",
    items: [ 
        DropdownMenuItem(
            child: Text("Dropdown Item I"), 
            value: "item1"
        ),

        DropdownMenuItem(
            child: Text("Dropdown Item II"), 
            value: "item2"
        )
    ],
    onChanged: (value){
       print("You selected $value");
    },
)

Add More Design to DecoratedDropdownButton():

DecoratedDropdownButton(
    value: "item1",
    items: [ 
        DropdownMenuItem(
            child: Text("Dropdown Item I"), 
            value: "item1"
        ),

        DropdownMenuItem(
            child: Text("Dropdown Item II"), 
            value: "item2"
        )
    ],
    onChanged: (value){
       print("You selected $value");
    },
    color: Colors.orange, //background color
    border: Border.all(color:Colors.redAccent, width: 2), //border 
    borderRadius: BorderRadius.circular(20), //border radius
    style: TextStyle( //text style
        color:Colors.white,
        fontSize: 20
    ),
    icon: Icon(Icons.arrow_downward), //icon
    iconEnableColor: Colors.white, //icon enable color
    dropdownColor: Colors.orange,  //dropdown background color
)

Additional information #

You can get further more information regarding dropdown button in Flutter.

Visit, FlutterCampus.com for Flutter Tutorials, Guides and App Templates

3
likes
110
pub points
69%
popularity

Publisher

verified publisher iconfluttercampus.com

A Flutter package with advanced dropdown Button which let you give different design on DropdownButton.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on decorated_dropdownbutton