Flutter_form_builder: Flutter 1.22 compatibility

Created on 1 Oct 2020  路  5Comments  路  Source: danvick/flutter_form_builder

After upgrading to Flutter 1.22, I now can't build:

../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-3.13.6/lib/src/fields/form_builder_range_slider.dart:21:9:
Error: Type 'RangeSemanticFormatterCallback' not found.
  final RangeSemanticFormatterCallback semanticFormatterCallback;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-3.13.6/lib/src/fields/form_builder_range_slider.dart:21:9:
Error: 'RangeSemanticFormatterCallback' isn't a type.
  final RangeSemanticFormatterCallback semanticFormatterCallback;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_form_builder-3.13.6/lib/src/form_builder_custom_field.dart:96:40: Error: The
getter 'autovalidate' isn't defined for the class 'FormField<T>'.
 - 'FormField' is from 'package:flutter/src/widgets/form.dart' ('../../../../flutter/packages/flutter/lib/src/widgets/form.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'autovalidate'.
        autovalidate: widget.formField.autovalidate,
                                       ^^^^^^^^^^^^

Most helpful comment

It looks like PR #427 and PR #471 already address these issues, so I suggest just merging those.

@danvick What do you think?

All 5 comments

It looks like RangeSemanticFormatterCallback was renamed to SemanticFormatterCallback.

According to FormField, autovalidate was _deprecated_ and is now removed. "Use autoValidateMode parameter which provide more specific behaviour related to auto validation:"

AutovalidateMode autovalidateMode})

It looks like PR #427 and PR #471 already address these issues, so I suggest just merging those.

@danvick What do you think?

Looks like I'm going to downgrade flutter until these PR gets merge.

Version 3.14.0 was just released. Thanks @danvick!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vimalmistry picture vimalmistry  路  4Comments

jans-y picture jans-y  路  7Comments

jaxnz picture jaxnz  路  3Comments

joshuakoh1 picture joshuakoh1  路  3Comments

ryanhz picture ryanhz  路  6Comments