Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a664731a
Unverified
Commit
a664731a
authored
Jan 28, 2021
by
Kate Lovett
Committed by
GitHub
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixes for nullOk changes (#74866)
parent
1efd34f0
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
773 additions
and
0 deletions
+773
-0
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+457
-0
cupertino.dart
packages/flutter/test_fixes/cupertino.dart
+63
-0
cupertino.dart.expect
packages/flutter/test_fixes/cupertino.dart.expect
+63
-0
material.dart
packages/flutter/test_fixes/material.dart
+52
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+52
-0
widgets.dart
packages/flutter/test_fixes/widgets.dart
+43
-0
widgets.dart.expect
packages/flutter/test_fixes/widgets.dart.expect
+43
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
a664731a
This diff is collapsed.
Click to expand it.
packages/flutter/test_fixes/cupertino.dart
View file @
a664731a
...
...
@@ -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
);
}
packages/flutter/test_fixes/cupertino.dart.expect
View file @
a664731a
...
...
@@ -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);
}
packages/flutter/test_fixes/material.dart
View file @
a664731a
...
...
@@ -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
);
}
packages/flutter/test_fixes/material.dart.expect
View file @
a664731a
...
...
@@ -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);
}
packages/flutter/test_fixes/widgets.dart
View file @
a664731a
...
...
@@ -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
);
}
packages/flutter/test_fixes/widgets.dart.expect
View file @
a664731a
...
...
@@ -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);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment