Skip to content

Commit 538027a

Browse files
committed
Release 4.0.0-pre.6
1 parent 04d9535 commit 538027a

File tree

5 files changed

+25
-13
lines changed

5 files changed

+25
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [4.0.0-pre.6] - 13-Nov-2020
2+
* **BREAKING CHANGE**: Attribute `readOnly` replaced by `enabled` - this was done to match Flutter's `FormField` naming convention
3+
* **BREAKING CHANGE**: To programatically set values use original `didChange()` method instead of `patchValue()`
4+
* New validator for integer values
5+
* Add option to remove `readOnly` field values from the final form value using `skipReadOnly` field. Closes #501
6+
* RadioGroup and CheckboxGroup labels not wrapping in vertical mode. Fixes #474
7+
* Allow changing `readOnly` and `initialValue` at runtime. Closes #515
8+
* Expanded the list of supported image file extensions to match Flutter's
9+
* Fixed bug where email validator was returning match validator `errorText`
10+
111
## [4.0.0-pre.5] - 24-Oct-2020
212
* Number of Chips to be selected in FilterChip can now be limited by setting `maxChips` attribute. Closes #500
313
* After calling patchValue on TextField, take cursor to end of text. Closes #477

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Column(
148148
),
149149
initialTime: TimeOfDay(hour: 8, minute: 0),
150150
// initialValue: DateTime.now(),
151-
// readonly: true,
151+
// enabled: true,
152152
),
153153
FormBuilderDateRangePicker(
154154
name: 'date_range',
@@ -439,11 +439,11 @@ FormBuilderField(
439439
### Programmatically changing field value
440440
You can either change the value of one field at a time like so:
441441
```dart
442-
_formKey.currentState.fields['color_picker'].patchValue(Colors.black);
442+
_formKey.currentState.fields['color_picker'].didChange(Colors.black);
443443
```
444444
Or multiple fields value like so:
445445
```dart
446-
_formKey.currentState.patchValue({
446+
_formKey.currentState.didChange({
447447
'age': '50',
448448
'slider': 6.7,
449449
'filter_chip': ['Test 1'],
@@ -469,6 +469,7 @@ Available built-in validators include:
469469
* `FormBuilderValidators.date()` - requires the field's value to be a valid date string.
470470
* `FormBuilderValidators.email()` - requires the field's value to be a valid email address.
471471
* `FormBuilderValidators.equal()` - requires the field's value be equal to provided object.
472+
* `FormBuilderValidators.integer()` - requires the field's value to be an integer.
472473
* `FormBuilderValidators.IP()` - requires the field's value to be a valid IP address.
473474
* `FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
474475
* `FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
@@ -528,6 +529,7 @@ Set the error text
528529
RaisedButton(
529530
child: Text('Submit'),
530531
onPressed: () async {
532+
setState(() => _emailError = null);
531533
if(checkIfEmailExists()){
532534
setState(() => _emailError = 'Email already taken.');
533535
}

lib/src/fields/form_builder_phone_field.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class _FormBuilderPhoneFieldState
244244
}
245245

246246
Future<void> _parsePhone() async {
247-
print('initialValue: $initialValue');
247+
// print('initialValue: $initialValue');
248248
if (initialValue != null && initialValue.isNotEmpty) {
249249
try {
250250
final parseResult = await PhoneNumberUtil().parse(initialValue);

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ packages:
168168
name: file_picker
169169
url: "https://pub.dartlang.org"
170170
source: hosted
171-
version: "2.0.11"
171+
version: "2.0.13"
172172
flutter:
173173
dependency: "direct main"
174174
description: flutter
@@ -251,7 +251,7 @@ packages:
251251
name: google_maps_flutter
252252
url: "https://pub.dartlang.org"
253253
source: hosted
254-
version: "1.0.5"
254+
version: "1.0.6"
255255
google_maps_flutter_platform_interface:
256256
dependency: transitive
257257
description:
@@ -293,7 +293,7 @@ packages:
293293
name: image_picker
294294
url: "https://pub.dartlang.org"
295295
source: hosted
296-
version: "0.6.7+12"
296+
version: "0.6.7+14"
297297
image_picker_for_web:
298298
dependency: "direct main"
299299
description:
@@ -419,7 +419,7 @@ packages:
419419
name: phone_number
420420
url: "https://pub.dartlang.org"
421421
source: hosted
422-
version: "0.8.0"
422+
version: "0.8.1"
423423
plugin_platform_interface:
424424
dependency: transitive
425425
description:

pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_form_builder
22
description: This package helps in creation of forms in Flutter by removing the boilerplate, reuse validation, react to changes, and collect final user input.
3-
version: 4.0.0-pre.5
3+
version: 4.0.0-pre.6
44
homepage: https://github.com/danvick/flutter_form_builder
55

66
environment:
@@ -19,18 +19,18 @@ dependencies:
1919
date_range_picker: ^1.0.6
2020
datetime_picker_formfield: ^1.0.0
2121
dropdown_search: ^0.4.6
22-
file_picker: ^2.0.11
22+
file_picker: ^2.0.13
2323
flutter_colorpicker: ^0.3.4
2424
flutter_chips_input: ^1.9.4
2525
flutter_datetime_picker: ^1.4.0
2626
flutter_touch_spin: ^1.0.1
2727
flutter_typeahead: ^1.8.8
28-
google_maps_flutter: ^1.0.5
29-
image_picker: ^0.6.7+12
28+
google_maps_flutter: ^1.0.6
29+
image_picker: ^0.6.7+14
3030
image_picker_for_web: ^0.1.0+2
3131
intl: ^0.16.1
3232
permission_handler: ^5.0.1+1
33-
phone_number: ^0.8.0
33+
phone_number: ^0.8.1
3434
rating_bar: ^0.2.0
3535
signature: ^3.2.0
3636
validators: ^2.0.1

0 commit comments

Comments
 (0)