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
83f3b7db
Unverified
Commit
83f3b7db
authored
Aug 07, 2018
by
amirh
Committed by
GitHub
Aug 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename OnPlatformViewCreated to PlatformViewCreatedCallback (#20189)
parent
9e9ac1a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
platform_views.dart
packages/flutter/lib/src/services/platform_views.dart
+4
-4
platform_view.dart
packages/flutter/lib/src/widgets/platform_view.dart
+1
-1
platform_views_test.dart
packages/flutter/test/services/platform_views_test.dart
+1
-1
No files found.
packages/flutter/lib/src/services/platform_views.dart
View file @
83f3b7db
...
...
@@ -37,7 +37,7 @@ class PlatformViewsRegistry {
/// Callback signature for when a platform view was created.
///
/// `id` is the platform view's unique identifier.
typedef
void
OnPlatformViewCreated
(
int
id
);
typedef
void
PlatformViewCreatedCallback
(
int
id
);
/// Provides access to the platform views service.
///
...
...
@@ -62,7 +62,7 @@ class PlatformViewsService {
static
AndroidViewController
initAndroidView
({
@required
int
id
,
@required
String
viewType
,
OnPlatformViewCreated
onPlatformViewCreated
,
PlatformViewCreatedCallback
onPlatformViewCreated
,
})
{
assert
(
id
!=
null
);
assert
(
viewType
!=
null
);
...
...
@@ -328,7 +328,7 @@ class AndroidViewController {
AndroidViewController
.
_
(
this
.
id
,
String
viewType
,
OnPlatformViewCreated
onPlatformViewCreated
,
PlatformViewCreatedCallback
onPlatformViewCreated
,
)
:
assert
(
id
!=
null
),
assert
(
viewType
!=
null
),
_viewType
=
viewType
,
...
...
@@ -370,7 +370,7 @@ class AndroidViewController {
final
String
_viewType
;
final
OnPlatformViewCreated
_onPlatformViewCreated
;
final
PlatformViewCreatedCallback
_onPlatformViewCreated
;
/// The texture entry id into which the Android view is rendered.
int
_textureId
;
...
...
packages/flutter/lib/src/widgets/platform_view.dart
View file @
83f3b7db
...
...
@@ -57,7 +57,7 @@ class AndroidView extends StatefulWidget {
/// Callback to invoke after the Android view has been created.
///
/// May be null.
final
OnPlatformViewCreated
onPlatformViewCreated
;
final
PlatformViewCreatedCallback
onPlatformViewCreated
;
@override
State
createState
()
=>
new
_AndroidViewState
();
...
...
packages/flutter/test/services/platform_views_test.dart
View file @
83f3b7db
...
...
@@ -94,7 +94,7 @@ void main() {
test
(
'OnPlatformViewCreated callback'
,
()
async
{
viewsController
.
registerViewType
(
'webview'
);
final
List
<
int
>
createdViews
=
<
int
>[];
final
OnPlatformViewCreated
callback
=
(
int
id
)
{
createdViews
.
add
(
id
);
};
final
PlatformViewCreatedCallback
callback
=
(
int
id
)
{
createdViews
.
add
(
id
);
};
final
AndroidViewController
controller1
=
PlatformViewsService
.
initAndroidView
(
id:
0
,
viewType:
'webview'
,
onPlatformViewCreated:
callback
);
...
...
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