Merge pull request #4 from SimonIT/autovalidate

Change from deprecated autovalidate to autovalidateMode
This commit is contained in:
reidha 2021-10-23 10:19:56 +08:00 committed by GitHub
commit a8848b2ff3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ class CheckboxIconFormField extends FormField<bool> {
BuildContext? context,
FormFieldSetter<bool>? onSaved,
bool initialValue = false,
bool autovalidate = false,
AutovalidateMode autovalidateMode,
bool enabled = true,
IconData trueIcon = Icons.check,
IconData falseIcon = Icons.check_box_outline_blank,
@ -20,7 +20,7 @@ class CheckboxIconFormField extends FormField<bool> {
key: key,
onSaved: onSaved,
initialValue: initialValue,
autovalidate: autovalidate,
autovalidateMode: autovalidateMode,
builder: (FormFieldState<bool> state) {
trueIconColor ??= (context == null
? null

View file

@ -9,7 +9,7 @@ class CheckboxListTileFormField extends FormField<bool> {
FormFieldSetter<bool>? onSaved,
FormFieldValidator<bool>? validator,
bool initialValue = false,
bool autovalidate = false,
AutovalidateMode autovalidateMode,
bool enabled = true,
bool dense = false,
Color? errorColor,
@ -22,7 +22,7 @@ class CheckboxListTileFormField extends FormField<bool> {
onSaved: onSaved,
validator: validator,
initialValue: initialValue,
autovalidate: autovalidate,
autovalidateMode: autovalidateMode,
builder: (FormFieldState<bool> state) {
errorColor ??=
(context == null ? Colors.red : Theme.of(context).errorColor);