diff --git a/flutter_vlc_player/lib/src/flutter_vlc_player.dart b/flutter_vlc_player/lib/src/flutter_vlc_player.dart index 2fb375e5..19eb26c9 100644 --- a/flutter_vlc_player/lib/src/flutter_vlc_player.dart +++ b/flutter_vlc_player/lib/src/flutter_vlc_player.dart @@ -9,26 +9,26 @@ class VlcPlayer extends StatefulWidget { final Widget? placeholder; final bool virtualDisplay; - const VlcPlayer({ - Key? key, + const VlcPlayer( + {Key? key, - /// The [VlcPlayerController] responsible for the video being rendered in - /// this widget. - required this.controller, + /// The [VlcPlayerController] responsible for the video being rendered in + /// this widget. + required this.controller, - /// The aspect ratio used to display the video. - /// This MUST be provided, however it could simply be (parentWidth / parentHeight) - where parentWidth and - /// parentHeight are the width and height of the parent perhaps as defined by a LayoutBuilder. - required this.aspectRatio, + /// The aspect ratio used to display the video. + /// This MUST be provided, however it could simply be (parentWidth / parentHeight) - where parentWidth and + /// parentHeight are the width and height of the parent perhaps as defined by a LayoutBuilder. + required this.aspectRatio, - /// Before the platform view has initialized, this placeholder will be rendered instead of the video player. - /// This can simply be a [CircularProgressIndicator] (see the example.) - this.placeholder, + /// Before the platform view has initialized, this placeholder will be rendered instead of the video player. + /// This can simply be a [CircularProgressIndicator] (see the example.) + this.placeholder, - /// Specify whether Virtual displays or Hybrid composition is used on Android. - /// iOS only uses Hybrid composition. - this.virtualDisplay = true - }) : super(key: key); + /// Specify whether Virtual displays or Hybrid composition is used on Android. + /// iOS only uses Hybrid composition. + this.virtualDisplay = true}) + : super(key: key); @override _VlcPlayerState createState() => _VlcPlayerState(); @@ -94,8 +94,9 @@ class _VlcPlayerState extends State ), Offstage( offstage: !_isInitialized, - child: vlcPlayerPlatform - .buildView(widget.controller.onPlatformViewCreated, virtualDisplay: widget.virtualDisplay), + child: vlcPlayerPlatform.buildView( + widget.controller.onPlatformViewCreated, + virtualDisplay: widget.virtualDisplay), ), ], ), diff --git a/flutter_vlc_player_platform_interface/lib/src/method_channel/method_channel_vlc_player.dart b/flutter_vlc_player_platform_interface/lib/src/method_channel/method_channel_vlc_player.dart index 695e8d43..d9d302c8 100644 --- a/flutter_vlc_player_platform_interface/lib/src/method_channel/method_channel_vlc_player.dart +++ b/flutter_vlc_player_platform_interface/lib/src/method_channel/method_channel_vlc_player.dart @@ -61,7 +61,8 @@ class MethodChannelVlcPlayer extends VlcPlayerPlatform { /// The `virtualDisplay` specifies whether Virtual displays or Hybrid composition is used on Android. /// iOS only uses Hybrid composition. @override - Widget buildView(PlatformViewCreatedCallback onPlatformViewCreated, {bool virtualDisplay = true}) { + Widget buildView(PlatformViewCreatedCallback onPlatformViewCreated, + {bool virtualDisplay = true}) { const viewType = 'flutter_video_plugin/getVideoView'; if (Platform.isAndroid) { if (virtualDisplay) { @@ -75,9 +76,9 @@ class MethodChannelVlcPlayer extends VlcPlayerPlatform { return PlatformViewLink( viewType: viewType, surfaceFactory: ( - BuildContext context, - PlatformViewController controller, - ) { + BuildContext context, + PlatformViewController controller, + ) { return AndroidViewSurface( controller: controller as AndroidViewController, gestureRecognizers: const {}, diff --git a/flutter_vlc_player_platform_interface/lib/src/platform_interface/vlc_player_platform_interface.dart b/flutter_vlc_player_platform_interface/lib/src/platform_interface/vlc_player_platform_interface.dart index 8c9f90c3..b9894b52 100644 --- a/flutter_vlc_player_platform_interface/lib/src/platform_interface/vlc_player_platform_interface.dart +++ b/flutter_vlc_player_platform_interface/lib/src/platform_interface/vlc_player_platform_interface.dart @@ -33,7 +33,8 @@ abstract class VlcPlayerPlatform extends PlatformInterface { } /// Returns a widget displaying the video. - Widget buildView(PlatformViewCreatedCallback onPlatformViewCreated, {bool virtualDisplay = true}) { + Widget buildView(PlatformViewCreatedCallback onPlatformViewCreated, + {bool virtualDisplay = true}) { throw _unimplemented('buildView'); }