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
f15f69a8
Unverified
Commit
f15f69a8
authored
Nov 23, 2019
by
chunhtai
Committed by
GitHub
Nov 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drops detached message until we can handle it properly (#45430)
parent
54aa53ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
binding.dart
packages/flutter/lib/src/scheduler/binding.dart
+5
-0
binding_test.dart
packages/flutter/test/widgets/binding_test.dart
+8
-0
No files found.
packages/flutter/lib/src/scheduler/binding.dart
View file @
f15f69a8
...
...
@@ -338,6 +338,11 @@ mixin SchedulerBinding on BindingBase, ServicesBinding {
}
Future
<
String
>
_handleLifecycleMessage
(
String
message
)
async
{
// TODO(chunhtai): remove the workaround once the issue is fixed
// https://github.com/flutter/flutter/issues/39832
if
(
message
==
'AppLifecycleState.detached'
)
return
null
;
handleAppLifecycleStateChanged
(
_parseAppLifecycleMessage
(
message
));
return
null
;
}
...
...
packages/flutter/test/widgets/binding_test.dart
View file @
f15f69a8
...
...
@@ -67,6 +67,14 @@ void main() {
message
=
const
StringCodec
().
encodeMessage
(
'AppLifecycleState.inactive'
);
await
defaultBinaryMessenger
.
handlePlatformMessage
(
'flutter/lifecycle'
,
message
,
(
_
)
{
});
expect
(
observer
.
lifecycleState
,
AppLifecycleState
.
inactive
);
message
=
const
StringCodec
().
encodeMessage
(
'AppLifecycleState.detached'
);
await
defaultBinaryMessenger
.
handlePlatformMessage
(
'flutter/lifecycle'
,
message
,
(
_
)
{
});
// TODO(chunhtai): this should be detached once the issue is fixed
// https://github.com/flutter/flutter/issues/39832
// The binding drops detached message for now.
expect
(
observer
.
lifecycleState
,
AppLifecycleState
.
inactive
);
});
testWidgets
(
'didPushRoute callback'
,
(
WidgetTester
tester
)
async
{
...
...
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