Skip to content

Dropdown Button Form Field

Dropdown Button Form Field demo

A representation of Menu.

NikuDropDownButtonFormField accepts all the props as same as DropDownButtonFormField.

dart
// Using namespace
n.DropDownButtonFormField();

// Using Niku Prefix
NikuDropDownButtonFormField();

Example Usage

dart
final options = ["Bael", "Paimon", "Babatos"];

n.DropdownButtonFormField<String>(value)
    ..labelText = "Solomon Lesser Demons"
    ..itemsValue = options
    ..onChanged = handleChange;

With Label Constructor

dart
final options = ["Bael", "Paimon", "Babatos"];

n.DropdownButtonFormField<String>.label("Solomon Lesser Demons")
    ..value = value
    ..itemsValue = options
    ..onChanged = handleChange;

Factory Method

Niku can accepts 6 factory method.

Factory MethodEquivalent Widget
n.DropDownButtonFormFieldDropDownButtonFormField
n.DropDownButtonFormFieldDropDownButtonFormField

Defination

View Defination on pub.dev