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
f461f1c9
Unverified
Commit
f461f1c9
authored
Jan 08, 2021
by
Kate Lovett
Committed by
GitHub
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated WidgetsBinding.[deferFirstFrameReport, allowFirstFrameReport] (#72893)
parent
29e2cfe9
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
52 additions
and
30 deletions
+52
-30
fix_data.yaml
packages/flutter/lib/fix_data.yaml
+22
-0
binding.dart
packages/flutter/lib/src/widgets/binding.dart
+0
-30
cupertino.dart
packages/flutter/test_fixes/cupertino.dart
+5
-0
cupertino.dart.expect
packages/flutter/test_fixes/cupertino.dart.expect
+5
-0
material.dart
packages/flutter/test_fixes/material.dart
+5
-0
material.dart.expect
packages/flutter/test_fixes/material.dart.expect
+5
-0
widgets.dart
packages/flutter/test_fixes/widgets.dart
+5
-0
widgets.dart.expect
packages/flutter/test_fixes/widgets.dart.expect
+5
-0
No files found.
packages/flutter/lib/fix_data.yaml
View file @
f461f1c9
...
...
@@ -11,6 +11,28 @@
version
:
1
transforms
:
# Changes made in https://github.com/flutter/flutter/pull/45941
-
title
:
'
Rename
to
deferFirstFrame'
date
:
2020-12-23
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
method
:
'
deferFirstFrameReport'
inClass
:
'
WidgetsBinding'
changes
:
-
kind
:
'
rename'
newName
:
'
deferFirstFrame'
# Changes made in https://github.com/flutter/flutter/pull/45941
-
title
:
'
Rename
to
allowFirstFrame'
date
:
2020-12-23
element
:
uris
:
[
'
material.dart'
,
'
cupertino.dart'
,
'
widgets.dart'
]
method
:
'
allowFirstFrameReport'
inClass
:
'
WidgetsBinding'
changes
:
-
kind
:
'
rename'
newName
:
'
allowFirstFrame'
# Changes made in https://github.com/flutter/flutter/pull/44189
-
title
:
'
Rename
to
dependOnInheritedElement'
date
:
2020-12-23
...
...
packages/flutter/lib/src/widgets/binding.dart
View file @
f461f1c9
...
...
@@ -731,36 +731,6 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
/// * [firstFrameRasterized], whether the first frame has finished rendering.
bool
get
debugDidSendFirstFrameEvent
=>
!
_needToReportFirstFrame
;
/// Tell the framework not to report the frame it is building as a "useful"
/// first frame until there is a corresponding call to [allowFirstFrameReport].
///
/// Deprecated. Use [deferFirstFrame]/[allowFirstFrame] to delay rendering the
/// first frame.
@Deprecated
(
'Use deferFirstFrame/allowFirstFrame to delay rendering the first frame. '
'This feature was deprecated after v1.12.4.'
)
void
deferFirstFrameReport
()
{
if
(!
kReleaseMode
)
{
deferFirstFrame
();
}
}
/// When called after [deferFirstFrameReport]: tell the framework to report
/// the frame it is building as a "useful" first frame.
///
/// Deprecated. Use [deferFirstFrame]/[allowFirstFrame] to delay rendering the
/// first frame.
@Deprecated
(
'Use deferFirstFrame/allowFirstFrame to delay rendering the first frame. '
'This feature was deprecated after v1.12.4.'
)
void
allowFirstFrameReport
()
{
if
(!
kReleaseMode
)
{
allowFirstFrame
();
}
}
void
_handleBuildScheduled
()
{
// If we're in the process of building dirty elements, then changes
// should not trigger a new frame.
...
...
packages/flutter/test_fixes/cupertino.dart
View file @
f461f1c9
...
...
@@ -9,6 +9,11 @@ void main() {
const
CupertinoTextThemeData
themeData
=
CupertinoTextThemeData
(
brightness:
Brightness
.
dark
);
themeData
.
copyWith
(
brightness:
Brightness
.
light
);
// Changes made in https://github.com/flutter/flutter/pull/45941
final
WidgetsBinding
binding
=
WidgetsBinding
.
instance
!;
binding
.
deferFirstFrameReport
();
binding
.
allowFirstFrameReport
();
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
...
...
packages/flutter/test_fixes/cupertino.dart.expect
View file @
f461f1c9
...
...
@@ -9,6 +9,11 @@ void main() {
const CupertinoTextThemeData themeData = CupertinoTextThemeData();
themeData.copyWith();
// Changes made in https://github.com/flutter/flutter/pull/45941
final WidgetsBinding binding = WidgetsBinding.instance!;
binding.deferFirstFrame();
binding.allowFirstFrame();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
...
...
packages/flutter/test_fixes/material.dart
View file @
f461f1c9
...
...
@@ -8,6 +8,11 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog
(
child:
Text
(
'Fix me.'
));
// Changes made in https://github.com/flutter/flutter/pull/45941
final
WidgetsBinding
binding
=
WidgetsBinding
.
instance
!;
binding
.
deferFirstFrameReport
();
binding
.
allowFirstFrameReport
();
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
...
...
packages/flutter/test_fixes/material.dart.expect
View file @
f461f1c9
...
...
@@ -8,6 +8,11 @@ void main() {
// Change made in https://github.com/flutter/flutter/pull/15303
showDialog(builder: (context) => Text('Fix me.'));
// Changes made in https://github.com/flutter/flutter/pull/45941
final WidgetsBinding binding = WidgetsBinding.instance!;
binding.deferFirstFrame();
binding.allowFirstFrame();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
...
...
packages/flutter/test_fixes/widgets.dart
View file @
f461f1c9
...
...
@@ -5,6 +5,11 @@
import
'package:flutter/widgets.dart'
;
void
main
(
)
{
// Changes made in https://github.com/flutter/flutter/pull/45941
final
WidgetsBinding
binding
=
WidgetsBinding
.
instance
!;
binding
.
deferFirstFrameReport
();
binding
.
allowFirstFrameReport
();
// Changes made in https://github.com/flutter/flutter/pull/44189
const
StatefulElement
statefulElement
=
StatefulElement
(
myWidget
);
statefulElement
.
inheritFromElement
(
ancestor
);
...
...
packages/flutter/test_fixes/widgets.dart.expect
View file @
f461f1c9
...
...
@@ -5,6 +5,11 @@
import 'package:flutter/widgets.dart';
void main() {
// Changes made in https://github.com/flutter/flutter/pull/45941
final WidgetsBinding binding = WidgetsBinding.instance!;
binding.deferFirstFrame();
binding.allowFirstFrame();
// Changes made in https://github.com/flutter/flutter/pull/44189
const StatefulElement statefulElement = StatefulElement(myWidget);
statefulElement.dependOnInheritedElement(ancestor);
...
...
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