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
7d7907e6
Unverified
Commit
7d7907e6
authored
Jul 08, 2020
by
Maurice Parrish
Committed by
GitHub
Jul 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where dispose message requires a map (#61035)
parent
5f496547
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
platform_views.dart
packages/flutter/lib/src/services/platform_views.dart
+5
-1
fake_platform_views.dart
packages/flutter/test/services/fake_platform_views.dart
+9
-5
No files found.
packages/flutter/lib/src/services/platform_views.dart
View file @
7d7907e6
...
...
@@ -1041,7 +1041,11 @@ class TextureAndroidViewController extends AndroidViewController {
@override
Future
<
void
>
_sendDisposeMessage
()
{
return
SystemChannels
.
platform_views
.
invokeMethod
<
void
>(
'dispose'
,
viewId
);
return
SystemChannels
.
platform_views
.
invokeMethod
<
void
>(
'dispose'
,
<
String
,
dynamic
>{
'id'
:
viewId
,
'hybrid'
:
false
,
});
}
}
...
...
packages/flutter/test/services/fake_platform_views.dart
View file @
7d7907e6
...
...
@@ -214,11 +214,15 @@ class FakeAndroidPlatformViewsController {
}
Future
<
dynamic
>
_dispose
(
MethodCall
call
)
{
int
id
;
if
(
call
.
arguments
is
int
)
{
id
=
call
.
arguments
as
int
;
}
else
if
(
call
.
arguments
is
Map
&&
call
.
arguments
[
'hybrid'
]
==
true
)
{
id
=
call
.
arguments
[
'id'
]
as
int
;
assert
(
call
.
arguments
is
Map
);
final
int
id
=
call
.
arguments
[
'id'
]
as
int
;
final
bool
hybrid
=
call
.
arguments
[
'hybrid'
]
as
bool
;
if
(
hybrid
&&
!
_views
[
id
].
hybrid
)
{
throw
ArgumentError
(
'An
$AndroidViewController
using hybrid composition must pass `hybrid: true`'
);
}
else
if
(!
hybrid
&&
_views
[
id
].
hybrid
!=
null
&&
_views
[
id
].
hybrid
)
{
throw
ArgumentError
(
'An
$AndroidViewController
not using hybrid composition must pass `hybrid: false`'
);
}
if
(!
_views
.
containsKey
(
id
))
...
...
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