diff --git a/lib/select_form_field.dart b/lib/select_form_field.dart index a2f6c9a..e3d8aba 100644 --- a/lib/select_form_field.dart +++ b/lib/select_form_field.dart @@ -208,7 +208,7 @@ class SelectFormField extends FormField { builder: (FormFieldState field) { final _SelectFormFieldState state = field as _SelectFormFieldState; - final InputDecoration effectiveDecoration = (decoration ?? + final InputDecoration effectiveDecoration = (decoration ?? InputDecoration( labelText: labelText, icon: state._icon ?? icon, @@ -217,7 +217,17 @@ class SelectFormField extends FormField { width: 10, margin: EdgeInsets.all(0), child: TextButton( - onPressed: () {}, + onPressed: () { + if (readOnly == false) { + switch (type) { + case SelectFormFieldType.dialog: + state._showSelectFormFieldDialog.call(); + break; + default: + state._showSelectFormFieldMenu.call(); + } + } + }, child: Icon(Icons.arrow_drop_down), ), ),