Unverified Commit a664731a authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Add fixes for nullOk changes (#74866)

parent 1efd34f0
This diff is collapsed.
......@@ -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 @@ void main() {
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);
}
......@@ -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 @@ void main() {
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);
}
......@@ -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 @@ void main() {
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);
}
......@@ -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 @@ void main() {
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);
}
......@@ -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 @@ void main() {
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);
}
......@@ -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 @@ void main() {
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);
}
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