You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-5Lines changed: 43 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ To use this plugin, add `flutter_form_builder` as a [dependency in your pubspec.
9
9
10
10
### Example
11
11
```dart
12
-
final GlobalKey<FormBuilderState> _fbKey = GlobalKey();
12
+
final GlobalKey<FormBuilderState> _fbKey = GlobalKey<FormBuilderState>();
13
13
```
14
14
**Note:** Avoid defining the GlobalKey inside your build method because this will create a new GlobalKey on every build cycle bringing about some erratic behavior.
15
15
@@ -186,7 +186,6 @@ In order to create an input field in the form, along with the label, and any app
186
186
|`validators`|`List<FormFieldValidator>`|`[]`|`false`| List of `FormFieldValidator`s that will check the validity of value candidate in the `FormField`|
187
187
|`onChanged`|`ValueChanged<T>`|`null`|`false`| This event function will fire immediately the the field value changes |
188
188
|`valueTransformer`|`ValueTransformer<T>`|`null`|`false`| Function that transforms field value before saving to form value. e.g. transform TextField value for numeric field from `String` to `num`|
189
-
190
189
The rest of the attributes will be determined by the type of Widget being used.
191
190
192
191
### Building your own custom `FormField`
@@ -261,16 +260,55 @@ FormBuilderTextField(
261
260
),
262
261
```
263
262
263
+
### Conditional validation
264
+
You can now validate a field based on the value of another field
265
+
```
266
+
FormBuilderRadio(
267
+
decoration: InputDecoration(labelText: 'My best language'),
This package is dependent on the following packages and plugins:
295
+
*[flutter_typeahead](https://pub.dartlang.org/packages/flutter_typeahead) by [https://github.com/AbdulRahmanAlHamali](https://github.com/AbdulRahmanAlHamali)
296
+
*[sy_flutter_widgets]((https://pub.dartlang.org/packages/sy_flutter_widgets)) by [Li Shuhao](https://github.com/lishuhao)
297
+
*[datetime_picker_formfield](https://pub.dartlang.org/packages/datetime_picker_formfield) by [Jacob Phillips](https://github.com/jifalops)
298
+
*[flutter_chips_input](https://pub.dartlang.org/packages/flutter_chips_input) by [Yours trully :)](https://github.com/danvick)
299
+
*[intl](https://pub.dartlang.org/packages/intl)
300
+
* The SignaturePad is based on [signature](https://pub.dartlang.org/packages/signature) by [4Q s.r.o.](https://github.com/4Q-s-r-o) with some minor improvements to fit our usage
301
+
264
302
## TODO:
265
303
### Improvements
266
304
-[X] Allow addition of custom input types
267
305
-[X] Improve documentation by showing complete list of input types and their usage and options
268
-
-[] Create a `transformer` function option that will convert field value when field id saved - can be used to convert string to number, change to uppercase etc.
269
-
-[] Assert no duplicates in `FormBuilderInput`s `attribute` names
306
+
-[X] Create a `transformer` function option that will convert field value when field id saved - can be used to convert string to number, change to uppercase etc.
307
+
-[X] Assert no duplicates in `FormBuilderInput`s `attribute` names
270
308
-[ ] Allow options for Checkboxes and Radios to appear left or right
271
309
272
310
### New FormBuilder inputs
273
-
-[X] SignaturePad
311
+
-[X] SignaturePad - Based on [https://pub.dartlang.org/packages/signature](https://pub.dartlang.org/packages/signature)
Copy file name to clipboardExpand all lines: pubspec.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
name: flutter_form_builder
2
2
description: Package to build Material Form with components such as TextField (With number, url, email validation), DropDown, TypeAhead, Radios, Checkboxes
0 commit comments