Add fixes for nullOk changes (#74866)
diff --git a/packages/flutter/lib/fix_data.yaml b/packages/flutter/lib/fix_data.yaml index 5d1359f..dc5ec5c 100644 --- a/packages/flutter/lib/fix_data.yaml +++ b/packages/flutter/lib/fix_data.yaml
@@ -11,6 +11,463 @@ version: 1 transforms: + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'resolveFrom' + inClass: 'MaterialBasedCupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoTextThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'NoDefaultCupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoThemeData' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68736. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'brightnessOf' + inClass: 'CupertinoTheme' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeBrightnessOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'of' + inClass: 'CupertinoUserInterfaceLevel' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolveFrom' + inClass: 'CupertinoDynamicColor' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68905. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'cupertino.dart' ] + method: 'resolve' + inClass: 'CupertinoDynamicColor' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeResolve' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68925. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'SliverAnimatedList' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68925. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'AnimatedList' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'invoke' + inClass: 'Actions' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeInvoke' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'find' + inClass: 'Actions' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeFind' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'handler' + inClass: 'Actions' + changes: + - kind: 'removeParameter' + name: 'nullOk' + + # Changes made in https://github.com/flutter/flutter/pull/68921. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Shortcuts' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Focus' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'FocusTraversalGroup' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68917. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'FocusTraversalOrder' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68911. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'localeOf' + inClass: 'Localizations' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeLocaleOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68910. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Router' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68908. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'of' + inClass: 'Scaffold' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68908. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart' ] + method: 'of' + inClass: 'ScaffoldMessenger' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/70726. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'Navigator' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + + # Changes made in https://github.com/flutter/flutter/pull/68736. + - title: "Migrate from 'nullOk'" + date: 2021-01-27 + element: + uris: [ 'material.dart', 'widgets.dart', 'cupertino.dart' ] + method: 'of' + inClass: 'MediaQuery' + oneOf: + - if: "nullOk == 'true'" + changes: + - kind: 'rename' + newName: 'maybeOf' + - kind: 'removeParameter' + name: 'nullOk' + - if: "nullOk == 'false'" + changes: + - kind: 'removeParameter' + name: 'nullOk' + variables: + nullOk: + kind: 'fragment' + value: 'arguments[nullOk]' + # Changes made in https://github.com/flutter/flutter/pull/44189. - title: "Rename to 'dependOnInheritedElement'" date: 2020-12-23
diff --git a/packages/flutter/test_fixes/cupertino.dart b/packages/flutter/test_fixes/cupertino.dart index c960b37..fac8bfe 100644 --- a/packages/flutter/test_fixes/cupertino.dart +++ b/packages/flutter/test_fixes/cupertino.dart
@@ -5,6 +5,9 @@ import 'package:flutter/cupertino.dart'; void main() { + // Generic reference variables. + BuildContext context; + // Change made in https://github.com/flutter/flutter/pull/41859 const CupertinoTextThemeData themeData = CupertinoTextThemeData(brightness: Brightness.dark); themeData.copyWith(brightness: Brightness.light); @@ -52,4 +55,64 @@ 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/68736 + MediaQuery.of(context, nullOk: true); + MediaQuery.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.of(context, nullOk: true); + Navigator.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.of(context, nullOk: true); + Router.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.localeOf(context, nullOk: true); + Localizations.localeOf(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.of(context, nullOk: true); + FocusTraversalOrder.of(context, nullOk: false); + FocusTraversalGroup.of(context, nullOk: true); + FocusTraversalGroup.of(context, nullOk: false); + Focus.of(context, nullOk: true); + Focus.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.of(context, nullOk: true); + Shortcuts.of(context, nullOk: false); + Actions.find(context, nullOk: true); + Actions.find(context, nullOk: false); + Actions.handler(context, nullOk: true); + Actions.handler(context, nullOk: false); + Actions.invoke(context, nullOk: true); + Actions.invoke(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.of(context, nullOk: true); + AnimatedList.of(context, nullOk: false); + SliverAnimatedList.of(context, nullOk: true); + SliverAnimatedList.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + CupertinoDynamicColor.resolve(Color(0), context, nullOk: true); + CupertinoDynamicColor.resolve(Color(0), context, nullOk: false); + CupertinoDynamicColor.resolveFrom(context, nullOk: true); + CupertinoDynamicColor.resolveFrom(context, nullOk: false); + CupertinoUserInterfaceLevel.of(context, nullOk: true); + CupertinoUserInterfaceLevel.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68736 + CupertinoTheme.brightnessOf(context, nullOk: true); + CupertinoTheme.brightnessOf(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + CupertinoThemeData.resolveFrom(context, nullOk: true); + CupertinoThemeData.resolveFrom(context, nullOk: false); + NoDefaultCupertinoThemeData.resolveFrom(context, nullOk: true); + NoDefaultCupertinoThemeData.resolveFrom(context, nullOk: false); + CupertinoTextThemeData.resolveFrom(context, nullOk: true); + CupertinoTextThemeData.resolveFrom(context, nullOk: false); }
diff --git a/packages/flutter/test_fixes/cupertino.dart.expect b/packages/flutter/test_fixes/cupertino.dart.expect index 05d04c1..f5687f6 100644 --- a/packages/flutter/test_fixes/cupertino.dart.expect +++ b/packages/flutter/test_fixes/cupertino.dart.expect
@@ -5,6 +5,9 @@ import 'package:flutter/cupertino.dart'; void main() { + // Generic reference variables. + BuildContext context; + // Change made in https://github.com/flutter/flutter/pull/41859 const CupertinoTextThemeData themeData = CupertinoTextThemeData(); themeData.copyWith(); @@ -52,4 +55,64 @@ 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/68736 + MediaQuery.maybeOf(context); + MediaQuery.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.maybeOf(context); + Navigator.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.maybeOf(context); + Router.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.maybeLocaleOf(context); + Localizations.localeOf(context); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.maybeOf(context); + FocusTraversalOrder.of(context); + FocusTraversalGroup.maybeOf(context); + FocusTraversalGroup.of(context); + Focus.maybeOf(context); + Focus.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.maybeOf(context); + Shortcuts.of(context); + Actions.maybeFind(context); + Actions.find(context); + Actions.handler(context); + Actions.handler(context); + Actions.maybeInvoke(context); + Actions.invoke(context); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.maybeOf(context); + AnimatedList.of(context); + SliverAnimatedList.maybeOf(context); + SliverAnimatedList.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + CupertinoDynamicColor.maybeResolve(Color(0), context); + CupertinoDynamicColor.resolve(Color(0), context); + CupertinoDynamicColor.resolveFrom(context); + CupertinoDynamicColor.resolveFrom(context); + CupertinoUserInterfaceLevel.maybeOf(context); + CupertinoUserInterfaceLevel.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68736 + CupertinoTheme.maybeBrightnessOf(context); + CupertinoTheme.brightnessOf(context); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + CupertinoThemeData.resolveFrom(context); + CupertinoThemeData.resolveFrom(context); + NoDefaultCupertinoThemeData.resolveFrom(context); + NoDefaultCupertinoThemeData.resolveFrom(context); + CupertinoTextThemeData.resolveFrom(context); + CupertinoTextThemeData.resolveFrom(context); }
diff --git a/packages/flutter/test_fixes/material.dart b/packages/flutter/test_fixes/material.dart index 9d161ad..69e9142 100644 --- a/packages/flutter/test_fixes/material.dart +++ b/packages/flutter/test_fixes/material.dart
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart'; void main() { + // Generic reference variables. + BuildContext context; // Changes made in https://github.com/flutter/flutter/pull/26259 const Scaffold scaffold = Scaffold(resizeToAvoidBottomPadding: true); @@ -114,4 +116,54 @@ style = textTheme.button; style = textTheme.subtitle; style = textTheme.overline; + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.of(context, nullOk: true); + MediaQuery.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.of(context, nullOk: true); + Navigator.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68908 + ScaffoldMessenger.of(context, nullOk: true); + ScaffoldMessenger.of(context, nullOk: false); + Scaffold.of(context, nullOk: true); + Scaffold.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.of(context, nullOk: true); + Router.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.localeOf(context, nullOk: true); + Localizations.localeOf(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.of(context, nullOk: true); + FocusTraversalOrder.of(context, nullOk: false); + FocusTraversalGroup.of(context, nullOk: true); + FocusTraversalGroup.of(context, nullOk: false); + Focus.of(context, nullOk: true); + Focus.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.of(context, nullOk: true); + Shortcuts.of(context, nullOk: false); + Actions.find(context, nullOk: true); + Actions.find(context, nullOk: false); + Actions.handler(context, nullOk: true); + Actions.handler(context, nullOk: false); + Actions.invoke(context, nullOk: true); + Actions.invoke(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.of(context, nullOk: true); + AnimatedList.of(context, nullOk: false); + SliverAnimatedList.of(context, nullOk: true); + SliverAnimatedList.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: true); + MaterialBasedCupertinoThemeData.resolveFrom(context, nullOk: false); }
diff --git a/packages/flutter/test_fixes/material.dart.expect b/packages/flutter/test_fixes/material.dart.expect index 03914b2..42f430c 100644 --- a/packages/flutter/test_fixes/material.dart.expect +++ b/packages/flutter/test_fixes/material.dart.expect
@@ -5,6 +5,8 @@ import 'package:flutter/material.dart'; void main() { + // Generic reference variables. + BuildContext context; // Changes made in https://github.com/flutter/flutter/pull/26259 const Scaffold scaffold = Scaffold(resizeToAvoidBottomInset: true); @@ -114,4 +116,54 @@ style = textTheme.button; style = textTheme.subtitle2; style = textTheme.overline; + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.maybeOf(context); + MediaQuery.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.maybeOf(context); + Navigator.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68908 + ScaffoldMessenger.maybeOf(context); + ScaffoldMessenger.of(context); + Scaffold.maybeOf(context); + Scaffold.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.maybeOf(context); + Router.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.maybeLocaleOf(context); + Localizations.localeOf(context); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.maybeOf(context); + FocusTraversalOrder.of(context); + FocusTraversalGroup.maybeOf(context); + FocusTraversalGroup.of(context); + Focus.maybeOf(context); + Focus.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.maybeOf(context); + Shortcuts.of(context); + Actions.maybeFind(context); + Actions.find(context); + Actions.handler(context); + Actions.handler(context); + Actions.maybeInvoke(context); + Actions.invoke(context); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.maybeOf(context); + AnimatedList.of(context); + SliverAnimatedList.maybeOf(context); + SliverAnimatedList.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68905 + MaterialBasedCupertinoThemeData.resolveFrom(context); + MaterialBasedCupertinoThemeData.resolveFrom(context); }
diff --git a/packages/flutter/test_fixes/widgets.dart b/packages/flutter/test_fixes/widgets.dart index 0de42a0..c882ee8 100644 --- a/packages/flutter/test_fixes/widgets.dart +++ b/packages/flutter/test_fixes/widgets.dart
@@ -5,6 +5,9 @@ import 'package:flutter/widgets.dart'; void main() { + // Generic reference variables. + BuildContext context; + // Changes made in https://github.com/flutter/flutter/pull/44189 const Element element = Element(myWidget); element.inheritFromElement(ancestor); @@ -48,4 +51,44 @@ const Stack stack = Stack(overflow: Overflow.visible); const Stack stack = Stack(overflow: Overflow.clip); final behavior = stack.overflow; + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.of(context, nullOk: true); + MediaQuery.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.of(context, nullOk: true); + Navigator.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.of(context, nullOk: true); + Router.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.localeOf(context, nullOk: true); + Localizations.localeOf(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.of(context, nullOk: true); + FocusTraversalOrder.of(context, nullOk: false); + FocusTraversalGroup.of(context, nullOk: true); + FocusTraversalGroup.of(context, nullOk: false); + Focus.of(context, nullOk: true); + Focus.of(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.of(context, nullOk: true); + Shortcuts.of(context, nullOk: false); + Actions.find(context, nullOk: true); + Actions.find(context, nullOk: false); + Actions.handler(context, nullOk: true); + Actions.handler(context, nullOk: false); + Actions.invoke(context, nullOk: true); + Actions.invoke(context, nullOk: false); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.of(context, nullOk: true); + AnimatedList.of(context, nullOk: false); + SliverAnimatedList.of(context, nullOk: true); + SliverAnimatedList.of(context, nullOk: false); }
diff --git a/packages/flutter/test_fixes/widgets.dart.expect b/packages/flutter/test_fixes/widgets.dart.expect index 92171a8..4f0378c 100644 --- a/packages/flutter/test_fixes/widgets.dart.expect +++ b/packages/flutter/test_fixes/widgets.dart.expect
@@ -5,6 +5,9 @@ import 'package:flutter/widgets.dart'; void main() { + // Generic reference variables. + BuildContext context; + // Changes made in https://github.com/flutter/flutter/pull/44189 const Element element = Element(myWidget); element.dependOnInheritedElement(ancestor); @@ -48,4 +51,44 @@ const Stack stack = Stack(clipBehavior: Clip.none); const Stack stack = Stack(clipBehavior: Clip.hardEdge); final behavior = stack.clipBehavior; + + // Changes made in https://github.com/flutter/flutter/pull/68736 + MediaQuery.maybeOf(context); + MediaQuery.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/70726 + Navigator.maybeOf(context); + Navigator.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68910 + Router.maybeOf(context); + Router.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68911 + Localizations.maybeLocaleOf(context); + Localizations.localeOf(context); + + // Changes made in https://github.com/flutter/flutter/pull/68917 + FocusTraversalOrder.maybeOf(context); + FocusTraversalOrder.of(context); + FocusTraversalGroup.maybeOf(context); + FocusTraversalGroup.of(context); + Focus.maybeOf(context); + Focus.of(context); + + // Changes made in https://github.com/flutter/flutter/pull/68921 + Shortcuts.maybeOf(context); + Shortcuts.of(context); + Actions.maybeFind(context); + Actions.find(context); + Actions.handler(context); + Actions.handler(context); + Actions.maybeInvoke(context); + Actions.invoke(context); + + // Changes made in https://github.com/flutter/flutter/pull/68925 + AnimatedList.maybeOf(context); + AnimatedList.of(context); + SliverAnimatedList.maybeOf(context); + SliverAnimatedList.of(context); }