Skip to content

Commit 526d54c

Browse files
author
Arjan Mels
committed
Corrected code formatting
1 parent 05f9966 commit 526d54c

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

packages/flutter_html_video/lib/flutter_html_video.dart

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,30 @@ class _VideoWidgetState extends State<VideoWidget> {
6666
_videoController = VideoPlayerController.asset(sourceUri.path);
6767
break;
6868
case 'file':
69-
_videoController = VideoPlayerController.file(File.fromUri(sourceUri));
69+
_videoController =
70+
VideoPlayerController.file(File.fromUri(sourceUri));
7071
break;
7172
default:
72-
_videoController = VideoPlayerController.network(sourceUri.toString());
73+
_videoController =
74+
VideoPlayerController.network(sourceUri.toString());
7375
break;
7476
}
7577
_chewieController = ChewieController(
7678
videoPlayerController: _videoController!,
77-
placeholder: attributes['poster'] != null && attributes['poster']!.isNotEmpty
78-
? Image.network(attributes['poster']!)
79-
: Container(color: Colors.black),
79+
placeholder:
80+
attributes['poster'] != null && attributes['poster']!.isNotEmpty
81+
? Image.network(attributes['poster']!)
82+
: Container(color: Colors.black),
8083
autoPlay: attributes['autoplay'] != null,
8184
looping: attributes['loop'] != null,
8285
showControls: attributes['controls'] != null,
8386
autoInitialize: true,
84-
aspectRatio: _width == null || _height == null ? null : _width! / _height!,
85-
deviceOrientationsOnEnterFullScreen: widget.deviceOrientationsOnEnterFullScreen,
86-
deviceOrientationsAfterFullScreen: widget.deviceOrientationsAfterFullScreen,
87+
aspectRatio:
88+
_width == null || _height == null ? null : _width! / _height!,
89+
deviceOrientationsOnEnterFullScreen:
90+
widget.deviceOrientationsOnEnterFullScreen,
91+
deviceOrientationsAfterFullScreen:
92+
widget.deviceOrientationsAfterFullScreen,
8793
);
8894
widget.callback?.call(
8995
widget.context.tree.element, _chewieController!, _videoController!);

0 commit comments

Comments
 (0)