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
834f5dc2
Unverified
Commit
834f5dc2
authored
Sep 08, 2023
by
Polina Cherkasova
Committed by
GitHub
Sep 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RestorationManager should dispatch creation in constructor. (#133911)
parent
621ad987
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
restoration.dart
packages/flutter/lib/src/services/restoration.dart
+3
-0
restoration_test.dart
packages/flutter/test/services/restoration_test.dart
+5
-0
No files found.
packages/flutter/lib/src/services/restoration.dart
View file @
834f5dc2
...
...
@@ -154,6 +154,9 @@ class RestorationManager extends ChangeNotifier {
/// Construct the restoration manager and set up the communications channels
/// with the engine to get restoration messages (by calling [initChannels]).
RestorationManager
()
{
if
(
kFlutterMemoryAllocationsEnabled
)
{
maybeDispatchObjectCreation
();
}
initChannels
();
}
...
...
packages/flutter/test/services/restoration_test.dart
View file @
834f5dc2
...
...
@@ -8,10 +8,15 @@ import 'package:flutter/scheduler.dart';
import
'package:flutter/services.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart'
;
import
'restoration.dart'
;
void
main
(
)
{
testWidgetsWithLeakTracking
(
'
$RestorationManager
dispatches memory events'
,
(
WidgetTester
tester
)
async
{
expect
(()
=>
RestorationManager
().
dispose
(),
dispatchesMemoryEvents
(
RestorationManager
));
});
group
(
'RestorationManager'
,
()
{
testWidgets
(
'root bucket retrieval'
,
(
WidgetTester
tester
)
async
{
final
List
<
MethodCall
>
callsToEngine
=
<
MethodCall
>[];
...
...
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