diff --git a/packages/flutter/lib/src/services/platform_views.dart b/packages/flutter/lib/src/services/platform_views.dart index d99545eb1a..775134e406 100644 --- a/packages/flutter/lib/src/services/platform_views.dart +++ b/packages/flutter/lib/src/services/platform_views.dart @@ -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; diff --git a/packages/flutter/lib/src/widgets/platform_view.dart b/packages/flutter/lib/src/widgets/platform_view.dart index cd5d71eb2f..a784685a2b 100644 --- a/packages/flutter/lib/src/widgets/platform_view.dart +++ b/packages/flutter/lib/src/widgets/platform_view.dart @@ -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(); diff --git a/packages/flutter/test/services/platform_views_test.dart b/packages/flutter/test/services/platform_views_test.dart index ffde83a1a8..e8159d194d 100644 --- a/packages/flutter/test/services/platform_views_test.dart +++ b/packages/flutter/test/services/platform_views_test.dart @@ -94,7 +94,7 @@ void main() { test('OnPlatformViewCreated callback', () async { viewsController.registerViewType('webview'); final List createdViews = []; - 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);