From 631e5c291eae05d4e3cc9c86b417f3f7476ac28d Mon Sep 17 00:00:00 2001 From: Sohrab Vahidli <63860581+sohrabonline@users.noreply.github.com> Date: Wed, 1 Feb 2023 12:06:09 +0400 Subject: [PATCH] select_form_field.dart There was bug onTap arrow icon. Bug fixed. --- lib/select_form_field.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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), ), ),