From b070d3ad0bdebf9c0ad862f4d217e9e5184ad9d0 Mon Sep 17 00:00:00 2001 From: SimonIT Date: Mon, 6 Sep 2021 14:45:53 +0200 Subject: [PATCH] Change from deprecated autovalidate to autovalidateMode --- lib/checkbox_icon_formfield.dart | 4 ++-- lib/checkbox_list_tile_formfield.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/checkbox_icon_formfield.dart b/lib/checkbox_icon_formfield.dart index 0e87ea7..9bd223b 100644 --- a/lib/checkbox_icon_formfield.dart +++ b/lib/checkbox_icon_formfield.dart @@ -7,7 +7,7 @@ class CheckboxIconFormField extends FormField { BuildContext context, FormFieldSetter 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 { key: key, onSaved: onSaved, initialValue: initialValue, - autovalidate: autovalidate, + autovalidateMode: autovalidateMode, builder: (FormFieldState state) { trueIconColor ??= (context == null ? null diff --git a/lib/checkbox_list_tile_formfield.dart b/lib/checkbox_list_tile_formfield.dart index 90060d8..bffbff1 100644 --- a/lib/checkbox_list_tile_formfield.dart +++ b/lib/checkbox_list_tile_formfield.dart @@ -9,7 +9,7 @@ class CheckboxListTileFormField extends FormField { FormFieldSetter onSaved, FormFieldValidator 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 { onSaved: onSaved, validator: validator, initialValue: initialValue, - autovalidate: autovalidate, + autovalidateMode: autovalidateMode, builder: (FormFieldState state) { errorColor ??= (context == null ? Colors.red : Theme.of(context).errorColor);