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
0b087a89
Unverified
Commit
0b087a89
authored
Aug 16, 2019
by
Chris Yang
Committed by
GitHub
Aug 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PlatformViewLink: update cached surface to be Widget type (#38639)
parent
ff0eca64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
platform_view.dart
packages/flutter/lib/src/widgets/platform_view.dart
+1
-1
platform_view_test.dart
packages/flutter/test/widgets/platform_view_test.dart
+16
-1
No files found.
packages/flutter/lib/src/widgets/platform_view.dart
View file @
0b087a89
...
...
@@ -678,7 +678,7 @@ class _PlatformViewLinkState extends State<PlatformViewLink> {
int
_id
;
PlatformViewController
_controller
;
bool
_platformViewCreated
=
false
;
PlatformViewSurface
_surface
;
Widget
_surface
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
packages/flutter/test/widgets/platform_view_test.dart
View file @
0b087a89
...
...
@@ -1968,7 +1968,6 @@ void main() {
testWidgets
(
'PlatformViewLink Widget dispose'
,
(
WidgetTester
tester
)
async
{
FakePlatformViewController
disposedController
;
final
PlatformViewLink
platformViewLink
=
PlatformViewLink
(
createPlatformViewController:
(
PlatformViewCreationParams
params
){
params
.
onPlatformViewCreated
(
params
.
id
);
disposedController
=
FakePlatformViewController
(
params
.
id
);
params
.
onPlatformViewCreated
(
params
.
id
);
return
disposedController
;
...
...
@@ -2041,5 +2040,21 @@ void main() {
]),
);
});
testWidgets
(
'PlatformViewLink can take any widget to return in the SurfaceFactory'
,
(
WidgetTester
tester
)
async
{
final
PlatformViewLink
platformViewLink
=
PlatformViewLink
(
createPlatformViewController:
(
PlatformViewCreationParams
params
){
params
.
onPlatformViewCreated
(
params
.
id
);
return
FakePlatformViewController
(
params
.
id
);
},
surfaceFactory:
(
BuildContext
context
,
PlatformViewController
controller
)
{
return
Container
();
});
await
tester
.
pumpWidget
(
platformViewLink
);
final
Container
container
=
tester
.
allWidgets
.
firstWhere
((
Widget
widget
){
return
widget
is
Container
;
});
expect
(
container
,
isNotNull
);
});
});
}
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