Change from deprecated autovalidate to autovalidateMode
This commit is contained in:
parent
97570ff2f9
commit
b070d3ad0b
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@ class CheckboxIconFormField extends FormField<bool> {
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
FormFieldSetter<bool> onSaved,
|
FormFieldSetter<bool> onSaved,
|
||||||
bool initialValue = false,
|
bool initialValue = false,
|
||||||
bool autovalidate = false,
|
AutovalidateMode autovalidateMode,
|
||||||
bool enabled = true,
|
bool enabled = true,
|
||||||
IconData trueIcon = Icons.check,
|
IconData trueIcon = Icons.check,
|
||||||
IconData falseIcon = Icons.check_box_outline_blank,
|
IconData falseIcon = Icons.check_box_outline_blank,
|
||||||
|
@ -20,7 +20,7 @@ class CheckboxIconFormField extends FormField<bool> {
|
||||||
key: key,
|
key: key,
|
||||||
onSaved: onSaved,
|
onSaved: onSaved,
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
autovalidate: autovalidate,
|
autovalidateMode: autovalidateMode,
|
||||||
builder: (FormFieldState<bool> state) {
|
builder: (FormFieldState<bool> state) {
|
||||||
trueIconColor ??= (context == null
|
trueIconColor ??= (context == null
|
||||||
? null
|
? null
|
||||||
|
|
|
@ -9,7 +9,7 @@ class CheckboxListTileFormField extends FormField<bool> {
|
||||||
FormFieldSetter<bool> onSaved,
|
FormFieldSetter<bool> onSaved,
|
||||||
FormFieldValidator<bool> validator,
|
FormFieldValidator<bool> validator,
|
||||||
bool initialValue = false,
|
bool initialValue = false,
|
||||||
bool autovalidate = false,
|
AutovalidateMode autovalidateMode,
|
||||||
bool enabled = true,
|
bool enabled = true,
|
||||||
bool dense = false,
|
bool dense = false,
|
||||||
Color errorColor,
|
Color errorColor,
|
||||||
|
@ -22,7 +22,7 @@ class CheckboxListTileFormField extends FormField<bool> {
|
||||||
onSaved: onSaved,
|
onSaved: onSaved,
|
||||||
validator: validator,
|
validator: validator,
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
autovalidate: autovalidate,
|
autovalidateMode: autovalidateMode,
|
||||||
builder: (FormFieldState<bool> state) {
|
builder: (FormFieldState<bool> state) {
|
||||||
errorColor ??=
|
errorColor ??=
|
||||||
(context == null ? Colors.red : Theme.of(context).errorColor);
|
(context == null ? Colors.red : Theme.of(context).errorColor);
|
||||||
|
|
Loading…
Reference in a new issue