diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml index 148598f4ce..4f62897ce5 100644 --- a/packages/flutter/lib/fix_data.yaml +++ b/packages/flutter/lib/fix_data.yaml @@ -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 diff --git a/packages/flutter/lib/src/material/dropdown.dart b/packages/flutter/lib/src/material/dropdown.dart index ae51b4f1df..3f92ad38ed 100644 --- a/packages/flutter/lib/src/material/dropdown.dart +++ b/packages/flutter/lib/src/material/dropdown.dart @@ -1471,7 +1471,7 @@ class DropdownButtonFormField extends FormField { FormFieldSetter? onSaved, FormFieldValidator? 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.' ) diff --git a/packages/flutter/lib/src/material/text_form_field.dart b/packages/flutter/lib/src/material/text_form_field.dart index ef43fdf2e1..1ac21f3269 100644 --- a/packages/flutter/lib/src/material/text_form_field.dart +++ b/packages/flutter/lib/src/material/text_form_field.dart @@ -157,7 +157,7 @@ class TextFormField extends FormField { 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.' ) diff --git a/packages/flutter/lib/src/widgets/form.dart b/packages/flutter/lib/src/widgets/form.dart index 66e44de662..8d030115c4 100644 --- a/packages/flutter/lib/src/widgets/form.dart +++ b/packages/flutter/lib/src/widgets/form.dart @@ -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 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 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.' ) diff --git a/packages/flutter/test_fixes/cupertino.dart b/packages/flutter/test_fixes/cupertino.dart index 6860509174..36aa30a1a3 100644 --- a/packages/flutter/test_fixes/cupertino.dart +++ b/packages/flutter/test_fixes/cupertino.dart @@ -27,4 +27,14 @@ void main() { buildContext.ancestorStateOfType(TypeMatcher()); buildContext.rootAncestorStateOfType(TypeMatcher()); buildContext.ancestorRenderObjectOfType(TypeMatcher()); + + // 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; } diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino.dart.expect index d6b9fb2fbd..e3d2422b37 100644 --- a/packages/flutter/test_fixes/cupertino.dart.expect +++ b/packages/flutter/test_fixes/cupertino.dart.expect @@ -27,4 +27,14 @@ void main() { buildContext.findAncestorStateOfType(); buildContext.findRootAncestorStateOfType(); buildContext.findAncestorRenderObjectOfType(); + + // 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; } diff --git a/packages/flutter/test_fixes/material.dart b/packages/flutter/test_fixes/material.dart index 223e956c8b..7b10995d1b 100644 --- a/packages/flutter/test_fixes/material.dart +++ b/packages/flutter/test_fixes/material.dart @@ -27,6 +27,24 @@ void main() { buildContext.rootAncestorStateOfType(TypeMatcher()); buildContext.ancestorRenderObjectOfType(TypeMatcher()); + // 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, diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect index 27f9aa765b..72d752fa5f 100644 --- a/packages/flutter/test_fixes/material.dart.expect +++ b/packages/flutter/test_fixes/material.dart.expect @@ -27,6 +27,24 @@ void main() { buildContext.findRootAncestorStateOfType(); buildContext.findAncestorRenderObjectOfType(); + // 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, diff --git a/packages/flutter/test_fixes/widgets.dart b/packages/flutter/test_fixes/widgets.dart index 3d6db09274..d86e860fdf 100644 --- a/packages/flutter/test_fixes/widgets.dart +++ b/packages/flutter/test_fixes/widgets.dart @@ -24,6 +24,16 @@ void main() { buildContext.rootAncestorStateOfType(TypeMatcher()); buildContext.ancestorRenderObjectOfType(TypeMatcher()); + // 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); diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets.dart.expect index 0fffa0a133..4287ebba18 100644 --- a/packages/flutter/test_fixes/widgets.dart.expect +++ b/packages/flutter/test_fixes/widgets.dart.expect @@ -24,6 +24,16 @@ void main() { buildContext.findRootAncestorStateOfType(); buildContext.findAncestorRenderObjectOfType(); + // 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);