flutter-form-builder-ecosystem / form_builder_extra_fields

Additional ready-made form input fields for flutter_form_builder package
https://pub.dev/packages/form_builder_extra_fields
BSD 3-Clause "New" or "Revised" License
28 stars 48 forks source link

Text style not getting set on search item #40

Closed WasimMemon closed 1 year ago

WasimMemon commented 2 years ago

How to change text style of popup items. I have tried to set font size small in all possible place, but it is not working. Still, it displays in big size. Check below screenshots.

And hint also not getting displayed in search box.

FormBuilderSearchableDropdown<AddressState>(
      popupProps: PopupProps.menu(showSearchBox: true, searchFieldProps: TextFieldProps(style: TextStyle(fontSize: 12),
              )),
      items: stateList,
      itemAsString: (model) => model.name ?? "",
      name: "addressState",
      initialValue: _businessState,
      compareFn: (item1, item2) => item1.isSelected != item2.isSelected,
      //isExpanded: true,
      dropdownSearchTextStyle: TextStyle(fontSize: 12),
     dropdownSearchDecoration: InputDecoration(
        hintText: 'Search',
          labelStyle: TextStyle(fontSize: 12),
      ),
      onChanged: (newValue) {
        if (!_businessState.isEqual(newValue!)) {
        }
      },
      decoration: InputDecoration(
        labelStyle: Theme.of(context).textTheme.bodySmall,
        hintText: S.current.labelState,
        contentPadding: EdgeInsets.only(left: 10, right: 12),
        border: Theme.of(context).inputDecorationTheme.border,
        focusedBorder: Theme.of(context).inputDecorationTheme.focusedBorder,
        errorBorder: Theme.of(context).inputDecorationTheme.errorBorder,
      ),
      filterFn: (item, filter) => item.name!.toLowerCase().contains(filter.toLowerCase()),
    );

Images

Screenshot 2022-10-29 at 8 23 31 PM Screenshot 2022-10-29 at 8 23 51 PM
deandreamatias commented 2 years ago

Maybe here you can see some solution