Unverified Commit 45d01c95 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Add fixes for autovalidate deprecation in Form, FormField, TextFormField, and...

Add fixes for autovalidate deprecation in Form, FormField, TextFormField, and DropdownButtonFormField (#73996)
parent 54ef030a
......@@ -11,6 +11,168 @@
version: 1
transforms:
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ]
field: 'autovalidate'
inClass: 'Form'
changes:
- kind: 'rename'
newName: 'autovalidateMode'
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ]
constructor: ''
inClass: 'Form'
oneOf:
- if: "autovalidate == 'true'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.always'
requiredIf: "autovalidate == 'true'"
- kind: 'removeParameter'
name: 'autovalidate'
- if: "autovalidate == 'false'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.disabled'
requiredIf: "autovalidate == 'false'"
- kind: 'removeParameter'
name: 'autovalidate'
variables:
autovalidate:
kind: 'fragment'
value: 'arguments[autovalidate]'
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ]
field: 'autovalidate'
inClass: 'FormField'
changes:
- kind: 'rename'
newName: 'autovalidateMode'
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'widgets.dart', 'material.dart', 'cupertino.dart' ]
constructor: ''
inClass: 'FormField'
oneOf:
- if: "autovalidate == 'true'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.always'
requiredIf: "autovalidate == 'true'"
- kind: 'removeParameter'
name: 'autovalidate'
- if: "autovalidate == 'false'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.disabled'
requiredIf: "autovalidate == 'false'"
- kind: 'removeParameter'
name: 'autovalidate'
variables:
autovalidate:
kind: 'fragment'
value: 'arguments[autovalidate]'
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'TextFormField'
oneOf:
- if: "autovalidate == 'true'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.always'
requiredIf: "autovalidate == 'true'"
- kind: 'removeParameter'
name: 'autovalidate'
- if: "autovalidate == 'false'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.disabled'
requiredIf: "autovalidate == 'false'"
- kind: 'removeParameter'
name: 'autovalidate'
variables:
autovalidate:
kind: 'fragment'
value: 'arguments[autovalidate]'
# Changes made in https://github.com/flutter/flutter/pull/61648
- title: 'Migrate to autovalidateMode'
date: 2020-09-02
element:
uris: [ 'material.dart' ]
constructor: ''
inClass: 'DropdownButtonFormField'
oneOf:
- if: "autovalidate == 'true'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.always'
requiredIf: "autovalidate == 'true'"
- kind: 'removeParameter'
name: 'autovalidate'
- if: "autovalidate == 'false'"
changes:
- kind: 'addParameter'
index: 0
name: 'autovalidateMode'
style: optional_named
argumentValue:
expression: 'AutoValidateMode.disabled'
requiredIf: "autovalidate == 'false'"
- kind: 'removeParameter'
name: 'autovalidate'
variables:
autovalidate:
kind: 'fragment'
value: 'arguments[autovalidate]'
# Changes made in https://github.com/flutter/flutter/pull/48547
- title: 'Renamed to headline1'
date: 2020-01-24
......
......@@ -1471,7 +1471,7 @@ class DropdownButtonFormField<T> extends FormField<T> {
FormFieldSetter<T>? onSaved,
FormFieldValidator<T>? validator,
@Deprecated(
'Use autoValidateMode parameter which provide more specific '
'Use autovalidateMode parameter which provide more specific '
'behaviour related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......
......@@ -157,7 +157,7 @@ class TextFormField extends FormField<String> {
SmartQuotesType? smartQuotesType,
bool enableSuggestions = true,
@Deprecated(
'Use autoValidateMode parameter which provide more specific '
'Use autovalidateMode parameter which provide more specific '
'behaviour related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......
......@@ -77,7 +77,7 @@ class Form extends StatefulWidget {
Key? key,
required this.child,
@Deprecated(
'Use autoValidateMode parameter which provides more specific '
'Use autovalidateMode parameter which provides more specific '
'behavior related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......@@ -143,7 +143,7 @@ class Form extends StatefulWidget {
/// Used to enable/disable form fields auto validation and update their error
/// text.
@Deprecated(
'Use autoValidateMode parameter which provides more specific '
'Use autovalidateMode parameter which provides more specific '
'behavior related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......@@ -326,7 +326,7 @@ class FormField<T> extends StatefulWidget {
this.validator,
this.initialValue,
@Deprecated(
'Use autoValidateMode parameter which provides more specific '
'Use autovalidateMode parameter which provides more specific '
'behavior related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......@@ -395,7 +395,7 @@ class FormField<T> extends StatefulWidget {
/// Used to enable/disable auto validation and update their error
/// text.
@Deprecated(
'Use autoValidateMode parameter which provides more specific '
'Use autovalidateMode parameter which provides more specific '
'behavior related to auto validation. '
'This feature was deprecated after v1.19.0.'
)
......
......@@ -27,4 +27,14 @@ void main() {
buildContext.ancestorStateOfType(TypeMatcher<targetType>());
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidate: true);
const Form form = Form(autovalidate: false);
final autoMode = form.autovalidate;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidate: true);
const FormField formField = FormField(autovalidate: false);
final autoMode = formField.autovalidate;
}
......@@ -27,4 +27,14 @@ void main() {
buildContext.findAncestorStateOfType<targetType>();
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidateMode: AutoValidateMode.always);
const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
final autoMode = form.autovalidateMode;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
final autoMode = formField.autovalidateMode;
}
......@@ -27,6 +27,24 @@ void main() {
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidate: true);
const Form form = Form(autovalidate: false);
final autoMode = form.autovalidate;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidate: true);
const FormField formField = FormField(autovalidate: false);
final autoMode = formField.autovalidate;
// Changes made in https://github.com/flutter/flutter/pull/61648
const TextFormField textFormField = TextFormField(autovalidate: true);
const TextFormField textFormField = TextFormField(autovalidate: false);
// Changes made in https://github.com/flutter/flutter/pull/61648
const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidate: true);
const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidate: false);
// Changes made in https://github.com/flutter/flutter/pull/48547
var TextTheme textTheme = TextTheme(
display4: displayStyle4,
......
......@@ -27,6 +27,24 @@ void main() {
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidateMode: AutoValidateMode.always);
const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
final autoMode = form.autovalidateMode;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
final autoMode = formField.autovalidateMode;
// Changes made in https://github.com/flutter/flutter/pull/61648
const TextFormField textFormField = TextFormField(autovalidateMode: AutoValidateMode.always);
const TextFormField textFormField = TextFormField(autovalidateMode: AutoValidateMode.disabled);
// Changes made in https://github.com/flutter/flutter/pull/61648
const DropdownButtonFormField dropDownButtonFormField = DropdownButtonFormField(autovalidateMode: AutoValidateMode.always);
const DropdownButtonFormField dropdownButtonFormField = DropdownButtonFormField(autovalidateMode: AutoValidateMode.disabled);
// Changes made in https://github.com/flutter/flutter/pull/48547
var TextTheme textTheme = TextTheme(
headline1: displayStyle4,
......
......@@ -24,6 +24,16 @@ void main() {
buildContext.rootAncestorStateOfType(TypeMatcher<targetType>());
buildContext.ancestorRenderObjectOfType(TypeMatcher<targetType>());
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidate: true);
const Form form = Form(autovalidate: false);
final autoMode = form.autovalidate;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidate: true);
const FormField formField = FormField(autovalidate: false);
final autoMode = formField.autovalidate;
// Changes made in https://github.com/flutter/flutter/pull/66305
const Stack stack = Stack(overflow: Overflow.visible);
const Stack stack = Stack(overflow: Overflow.clip);
......
......@@ -24,6 +24,16 @@ void main() {
buildContext.findRootAncestorStateOfType<targetType>();
buildContext.findAncestorRenderObjectOfType<targetType>();
// Changes made in https://github.com/flutter/flutter/pull/61648
const Form form = Form(autovalidateMode: AutoValidateMode.always);
const Form form = Form(autovalidateMode: AutoValidateMode.disabled);
final autoMode = form.autovalidateMode;
// Changes made in https://github.com/flutter/flutter/pull/61648
const FormField formField = FormField(autovalidateMode: AutoValidateMode.always);
const FormField formField = FormField(autovalidateMode: AutoValidateMode.disabled);
final autoMode = formField.autovalidateMode;
// Changes made in https://github.com/flutter/flutter/pull/66305
const Stack stack = Stack(clipBehavior: Clip.none);
const Stack stack = Stack(clipBehavior: Clip.hardEdge);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment