Skip to content

Commit eb66d88

Browse files
Merge pull request #25 from flutter-form-builder-ecosystem/8
Set adaptive height to FormBuilderSearchableDropdown
2 parents 44cb826 + a4e065f commit eb66d88

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.github/workflows/base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: Analyze static code
4040
run: flutter analyze
4141
- name: Run tests
42-
run: flutter test
42+
run: flutter test --coverage
4343
- name: Check publish warnings
4444
run: dart pub publish --dry-run
4545
- name: Build example

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ___
1313
- [Features](#features)
1414
- [Inputs](#inpus)
1515
- [Parameters](#parameters)
16+
- [Dependency parameters](#dependency-parameters)
1617
- [Use](#use)
1718
- [Setup](#setup)
1819
- [Basic use](#basic-use)
@@ -57,6 +58,21 @@ In order to create an input field in the form, along with the label, and any app
5758
| `valueTransformer` | `ValueTransformer<T>` | `null` | `No` | Function that transforms field value before saving to form value. e.g. transform TextField value for numeric field from `String` to `num` |
5859
The rest of the attributes will be determined by the type of Widget being used.
5960

61+
### Dependency parameters
62+
63+
Each field has a dependency with your own configurations. Take a look on dependencies repositories to understand the behaviour and properties:
64+
65+
66+
| Field | Dependency |
67+
|-------|------------|
68+
|`FormBuilderChipsInput`|[flutter_chips_input](https://pub.dev/packages/flutter_chips_input)|
69+
|`FormBuilderColorPicker`|[flutter_datetime_picker_bdaya](https://pub.dev/packages/flutter_datetime_picker_bdaya)|
70+
|`FormBuilderCupertinoDateTimePicker`|[flutter_colorpicker](https://pub.dev/packages/flutter_colorpicker)|
71+
|`FormBuilderRating`|[flutter_rating_bar](https://pub.dev/packages/flutter_rating_bar)|
72+
|`FormBuilderSignaturePad`|[signature](https://pub.dev/packages/signature)|
73+
|`FormBuilderTouchSpin`|[flutter_touch_spin](https://pub.dev/packages/flutter_touch_spin)|
74+
|`FormBuilderTypeAhead`|[flutter_typeahead](https://pub.dev/packages/flutter_typeahead)|
75+
6076
## Use
6177

6278
### Setup
@@ -80,7 +96,6 @@ See [pud.dev example tab](https://pub.dev/packages/form_builder_extra_fields/exa
8096

8197
For more instructions about `FormBuilder`, see [flutter_form_builder](https://pub.dev/packages/flutter_form_builder) package
8298

83-
8499
## Support
85100

86101
### Contribute

example/lib/main.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class _MyHomePageState extends State<MyHomePage> {
5757
child: Column(
5858
children: [
5959
FormBuilderSearchableDropdown<String>(
60-
popupProps: const PopupProps.menu(showSearchBox: true),
6160
name: 'searchable_dropdown_online',
6261
onChanged: _onChanged,
6362
asyncItems: (filter) async {

lib/src/fields/form_builder_searchable_dropdown.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField<T> {
129129
this.shouldRequestFocus = false,
130130
@Deprecated('Please use [clearButtonProps] instead')
131131
this.showClearButton = false,
132-
this.popupProps = const PopupProps.menu(),
132+
this.popupProps = const PopupProps.menu(
133+
showSearchBox: true,
134+
fit: FlexFit.loose,
135+
),
133136
this.clearButtonProps,
134137
this.dropdownSearchTextStyle,
135138
this.dropdownButtonProps,
@@ -174,7 +177,6 @@ class FormBuilderSearchableDropdown<T> extends FormBuilderField<T> {
174177
baseStyle: dropdownSearchTextStyle,
175178
),
176179
filterFn: filterFn,
177-
// isFilteredOnline: isFilteredOnline,
178180
items: items,
179181
itemAsString: itemAsString,
180182
onBeforeChange: onBeforeChange,

0 commit comments

Comments
 (0)