diff --git a/lib/src/fullscreen_player.dart b/lib/src/fullscreen_player.dart index 561a15c..8d4da78 100644 --- a/lib/src/fullscreen_player.dart +++ b/lib/src/fullscreen_player.dart @@ -7,7 +7,7 @@ import 'quality_links.dart'; import 'dart:async'; // ignore: must_be_immutable -class FullscreenPlayer extends StatefulWidget{ +class FullscreenPlayer extends StatefulWidget { final String id; final bool autoPlay; final bool looping; @@ -31,7 +31,6 @@ class FullscreenPlayer extends StatefulWidget{ _FullscreenPlayerState createState() => _FullscreenPlayerState(id, autoPlay, looping, controller, position, initFuture, qualityValue); } - class _FullscreenPlayerState extends State { String _id; bool autoPlay = false; @@ -82,10 +81,7 @@ class _FullscreenPlayerState extends State { }); setState(() { - SystemChrome.setPreferredOrientations([ - DeviceOrientation.landscapeLeft, - DeviceOrientation.landscapeRight - ]); + SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]); SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); }); @@ -95,152 +91,141 @@ class _FullscreenPlayerState extends State { @override Widget build(BuildContext context) { return Scaffold( - body: Center( - child: Stack( - alignment: AlignmentDirectional.center, - children: [ - GestureDetector( - child: FutureBuilder( - future: initFuture, - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.done) { - //Управление шириной и высотой видео - double delta = MediaQuery.of(context).size.width - - MediaQuery.of(context).size.height * - _controller.value.aspectRatio; - if (MediaQuery.of(context).orientation == - Orientation.portrait || - delta < 0) { - videoHeight = MediaQuery.of(context).size.width / - _controller.value.aspectRatio; - videoWidth = MediaQuery.of(context).size.width; - videoMargin = 0; - } else { - videoHeight = MediaQuery.of(context).size.height; - videoWidth = videoHeight * _controller.value.aspectRatio; - videoMargin = - (MediaQuery.of(context).size.width - videoWidth) / 2; - } + body: Center( + child: Stack( + alignment: AlignmentDirectional.center, + children: [ + GestureDetector( + child: FutureBuilder( + future: initFuture, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + //Управление шириной и высотой видео + double delta = MediaQuery.of(context).size.width - MediaQuery.of(context).size.height * _controller.value.aspectRatio; + if (MediaQuery.of(context).orientation == Orientation.portrait || delta < 0) { + videoHeight = MediaQuery.of(context).size.width / _controller.value.aspectRatio; + videoWidth = MediaQuery.of(context).size.width; + videoMargin = 0; + } else { + videoHeight = MediaQuery.of(context).size.height; + videoWidth = videoHeight * _controller.value.aspectRatio; + videoMargin = (MediaQuery.of(context).size.width - videoWidth) / 2; + } - doubleTapRWidth = videoWidth; - doubleTapRHeight = videoHeight - 36; - doubleTapLWidth = videoWidth; - doubleTapLHeight = videoHeight; + doubleTapRWidth = videoWidth; + doubleTapRHeight = videoHeight - 36; + doubleTapLWidth = videoWidth; + doubleTapLHeight = videoHeight; - if (_seek && fullScreen){ - _controller.seekTo(Duration(seconds: position)); - _seek = false; - } - if (_seek && _controller.value.duration.inSeconds > 2) { - _controller.seekTo(Duration(seconds: position)); - _seek = false; - } - SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); - //Отрисовка элементов плеера - return Stack( - children: [ - Container( - height: videoHeight, - width: videoWidth, - margin: EdgeInsets.only(left: videoMargin), - child: VideoPlayer(_controller), - ), - _videoOverlay(), - ], - ); - } else { - return Center( - heightFactor: 6, - child: CircularProgressIndicator( - strokeWidth: 4, - valueColor: - AlwaysStoppedAnimation(Color(0xFF22A3D2)), - )); - } - }), - onTap: () { - setState(() { - _overlay = !_overlay; - if (_overlay){ - doubleTapRHeight = videoHeight - 36; - doubleTapLHeight = videoHeight - 10; - doubleTapRMargin = 36; - doubleTapLMargin = 10; + if (_seek && fullScreen) { + _controller.seekTo(Duration(seconds: position)); + _seek = false; } - else if (!_overlay){ - doubleTapRHeight = videoHeight + 36; - doubleTapLHeight = videoHeight; - doubleTapRMargin = 0; - doubleTapLMargin = 0; + if (_seek && _controller.value.duration.inSeconds > 2) { + _controller.seekTo(Duration(seconds: position)); + _seek = false; } - }); - }, - ), - GestureDetector( - child: Container( - width: doubleTapLWidth / 2 - 30, - height: doubleTapLHeight - 44, - margin: EdgeInsets.fromLTRB(0, 0, doubleTapLWidth / 2 + 30, 40), - decoration: BoxDecoration( - //color: Colors.red, - ), - ), - onTap: () { - setState(() { - _overlay = !_overlay; - if (_overlay){ - doubleTapRHeight = videoHeight - 36; - doubleTapLHeight = videoHeight - 10; - doubleTapRMargin = 36; - doubleTapLMargin = 10; - } - else if (!_overlay){ - doubleTapRHeight = videoHeight + 36; - doubleTapLHeight = videoHeight; - doubleTapRMargin = 0; - doubleTapLMargin = 0; - } - }); - }, - onDoubleTap:(){ - setState(() { - _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds - 10)); - }); + SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]); + //Отрисовка элементов плеера + return Stack( + children: [ + Container( + height: videoHeight, + width: videoWidth, + margin: EdgeInsets.only(left: videoMargin), + child: VideoPlayer(_controller), + ), + _videoOverlay(), + ], + ); + } else { + return Center( + heightFactor: 6, + child: CircularProgressIndicator( + strokeWidth: 4, + valueColor: AlwaysStoppedAnimation(Color(0xFF22A3D2)), + )); } - ), GestureDetector( - child: Container( - width: doubleTapRWidth / 2 - 45, - height: doubleTapRHeight - 80, - margin: EdgeInsets.fromLTRB(doubleTapRWidth / 2 + 45, 0, 0, doubleTapLMargin + 20), - decoration: BoxDecoration( - //color: Colors.red, + }), + onTap: () { + setState(() { + _overlay = !_overlay; + if (_overlay) { + doubleTapRHeight = videoHeight - 36; + doubleTapLHeight = videoHeight - 10; + doubleTapRMargin = 36; + doubleTapLMargin = 10; + } else if (!_overlay) { + doubleTapRHeight = videoHeight + 36; + doubleTapLHeight = videoHeight; + doubleTapRMargin = 0; + doubleTapLMargin = 0; + } + }); + }, + ), + GestureDetector( + child: Container( + width: doubleTapLWidth / 2 - 30, + height: doubleTapLHeight - 44, + margin: EdgeInsets.fromLTRB(0, 0, doubleTapLWidth / 2 + 30, 40), + decoration: BoxDecoration( + //color: Colors.red, ), - ), - onTap: () { - setState(() { - _overlay = !_overlay; - if (_overlay){ - doubleTapRHeight = videoHeight - 36; - doubleTapLHeight = videoHeight - 10; - doubleTapRMargin = 36; - doubleTapLMargin = 10; - } - else if (!_overlay){ - doubleTapRHeight = videoHeight + 36; - doubleTapLHeight = videoHeight; - doubleTapRMargin = 0; - doubleTapLMargin = 0; - } - }); - }, - onDoubleTap:(){ - setState(() { - _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds + 10)); - }); + ), + onTap: () { + setState(() { + _overlay = !_overlay; + if (_overlay) { + doubleTapRHeight = videoHeight - 36; + doubleTapLHeight = videoHeight - 10; + doubleTapRMargin = 36; + doubleTapLMargin = 10; + } else if (!_overlay) { + doubleTapRHeight = videoHeight + 36; + doubleTapLHeight = videoHeight; + doubleTapRMargin = 0; + doubleTapLMargin = 0; } + }); + }, + onDoubleTap: () { + setState(() { + _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds - 10)); + }); + }), + GestureDetector( + child: Container( + width: doubleTapRWidth / 2 - 45, + height: doubleTapRHeight - 80, + margin: EdgeInsets.fromLTRB(doubleTapRWidth / 2 + 45, 0, 0, doubleTapLMargin + 20), + decoration: BoxDecoration( + //color: Colors.red, + ), ), - ], - ))); + onTap: () { + setState(() { + _overlay = !_overlay; + if (_overlay) { + doubleTapRHeight = videoHeight - 36; + doubleTapLHeight = videoHeight - 10; + doubleTapRMargin = 36; + doubleTapLMargin = 10; + } else if (!_overlay) { + doubleTapRHeight = videoHeight + 36; + doubleTapLHeight = videoHeight; + doubleTapRMargin = 0; + doubleTapLMargin = 0; + } + }); + }, + onDoubleTap: () { + setState(() { + _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds + 10)); + }); + }), + ], + ))); } //================================ Quality ================================// @@ -252,18 +237,19 @@ class _FullscreenPlayerState extends State { _qualityValues.forEach((elem, value) => (children.add(new ListTile( title: new Text(" ${elem.toString()} fps"), onTap: () => { - //Обновление состояние приложения и перерисовка - setState(() { - _controller.pause(); - _controller = VideoPlayerController.network(value); - _controller.setLooping(true); - _seek = true; - initFuture = _controller.initialize(); - _controller.play(); - }), - })))); + //Обновление состояние приложения и перерисовка + setState(() { + _controller.pause(); + _controller = VideoPlayerController.network(value); + _controller.setLooping(true); + _seek = true; + initFuture = _controller.initialize(); + _controller.play(); + }), + })))); return Container( + color: Theme.of(context).backgroundColor, height: videoHeight, child: ListView( children: children, @@ -276,96 +262,84 @@ class _FullscreenPlayerState extends State { Widget _videoOverlay() { return _overlay ? Stack( - children: [ - GestureDetector( - child: Center( + children: [ + GestureDetector( + child: Center( + child: Container( + width: videoWidth, + height: videoHeight, + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.centerRight, + end: Alignment.centerLeft, + colors: [const Color(0x662F2C47), const Color(0x662F2C47)], + ), + ), + ), + ), + ), + Center( + child: IconButton( + padding: EdgeInsets.only( + top: videoHeight / 2 - 50, + bottom: videoHeight / 2 - 30, + ), + icon: _controller.value.isPlaying ? Icon(Icons.pause, size: 60.0) : Icon(Icons.play_arrow, size: 60.0), + onPressed: () { + setState(() { + _controller.value.isPlaying ? _controller.pause() : _controller.play(); + }); + }), + ), + Container( + margin: EdgeInsets.only(top: videoHeight - 80, left: videoWidth + videoMargin - 50), + child: IconButton( + alignment: AlignmentDirectional.center, + icon: Icon(Icons.fullscreen, size: 30.0), + onPressed: () { + setState(() { + _controller.pause(); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]); + SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top, SystemUiOverlay.bottom]); + }); + Navigator.pop(context, _controller.value.position.inSeconds); + }), + ), + Container( + margin: EdgeInsets.only(left: videoWidth + videoMargin - 48), + child: IconButton( + icon: Icon(Icons.settings, size: 26.0), + onPressed: () { + position = _controller.value.position.inSeconds; + _seek = true; + _settingModalBottomSheet(context); + setState(() {}); + }), + ), + Container( + //===== Ползунок =====// + margin: EdgeInsets.only(top: videoHeight - 40, left: videoMargin), //CHECK IT + child: _videoOverlaySlider(), + ) + ], + ) + : Center( child: Container( + height: 5, width: videoWidth, - height: videoHeight, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.centerRight, - end: Alignment.centerLeft, - colors: [ - const Color(0x662F2C47), - const Color(0x662F2C47) - ], + margin: EdgeInsets.only(top: videoHeight - 5), + child: VideoProgressIndicator( + _controller, + allowScrubbing: true, + colors: VideoProgressColors( + playedColor: Color(0xFF22A3D2), + backgroundColor: Color(0x5515162B), + bufferedColor: Color(0x5583D8F7), ), + padding: EdgeInsets.only(top: 2), ), ), - ), - ), - Center( - child: IconButton( - padding: EdgeInsets.only( - top: videoHeight / 2 - 50, - bottom: videoHeight / 2 - 30, - ), - icon: _controller.value.isPlaying - ? Icon(Icons.pause, size: 60.0) - : Icon(Icons.play_arrow, size: 60.0), - onPressed: () { - setState(() { - _controller.value.isPlaying - ? _controller.pause() - : _controller.play(); - }); - }), - ), - Container( - margin: EdgeInsets.only( - top: videoHeight - 80, left: videoWidth + videoMargin - 50), - child: IconButton( - alignment: AlignmentDirectional.center, - icon: Icon(Icons.fullscreen, size: 30.0), - onPressed: () { - setState(() { - _controller.pause(); - SystemChrome.setPreferredOrientations([ - DeviceOrientation.portraitDown, - DeviceOrientation.portraitUp - ]); - SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top, SystemUiOverlay.bottom]); - }); - Navigator.pop(context, _controller.value.position.inSeconds); - }), - ), - Container( - margin: EdgeInsets.only(left: videoWidth + videoMargin - 48), - child: IconButton( - icon: Icon(Icons.settings, size: 26.0), - onPressed: () { - position = _controller.value.position.inSeconds; - _seek = true; - _settingModalBottomSheet(context); - setState(() {}); - }), - ), - Container( - //===== Ползунок =====// - margin: EdgeInsets.only( - top: videoHeight - 40, left: videoMargin), //CHECK IT - child: _videoOverlaySlider(), - ) - ], - ) - : Center( - child: Container( - height: 5, - width: videoWidth, - margin: EdgeInsets.only(top: videoHeight - 5), - child: VideoProgressIndicator( - _controller, - allowScrubbing: true, - colors: VideoProgressColors( - playedColor: Color(0xFF22A3D2), - backgroundColor: Color(0x5515162B), - bufferedColor: Color(0x5583D8F7), - ), - padding: EdgeInsets.only(top: 2), - ), - ), - ); + ); } //=================== ПОЛЗУНОК ===================// @@ -379,10 +353,7 @@ class _FullscreenPlayerState extends State { Container( width: 46, alignment: Alignment(0, 0), - child: Text(value.position.inMinutes.toString() + - ':' + - (value.position.inSeconds - value.position.inMinutes * 60) - .toString()), + child: Text(value.position.inMinutes.toString() + ':' + (value.position.inSeconds - value.position.inMinutes * 60).toString()), ), Container( height: 20, @@ -401,10 +372,7 @@ class _FullscreenPlayerState extends State { Container( width: 46, alignment: Alignment(0, 0), - child: Text(value.duration.inMinutes.toString() + - ':' + - (value.duration.inSeconds - value.duration.inMinutes * 60) - .toString()), + child: Text(value.duration.inMinutes.toString() + ':' + (value.duration.inSeconds - value.duration.inMinutes * 60).toString()), ), ], ); @@ -414,4 +382,4 @@ class _FullscreenPlayerState extends State { }, ); } -} \ No newline at end of file +} diff --git a/lib/vimeoplayer.dart b/lib/vimeoplayer.dart index 5cec7b6..4185182 100644 --- a/lib/vimeoplayer.dart +++ b/lib/vimeoplayer.dart @@ -40,7 +40,7 @@ class _VimeoPlayerState extends State { QualityLinks _quality; // Quality Class Map _qualityValues; - var _qualityValue; + var _qualityValue; bool _seek = false; double videoHeight; @@ -69,16 +69,12 @@ class _VimeoPlayerState extends State { //Обновление состояние приложения и перерисовка setState(() { - SystemChrome.setPreferredOrientations([ - DeviceOrientation.portraitDown, - DeviceOrientation.portraitUp - ]); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]); }); }); //На странице видео преимущество за портретной ориентацией - SystemChrome.setPreferredOrientations( - [DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitDown, DeviceOrientation.portraitUp]); SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values); super.initState(); @@ -96,9 +92,7 @@ class _VimeoPlayerState extends State { builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { //Управление шириной и высотой видео - double delta = MediaQuery.of(context).size.width - - MediaQuery.of(context).size.height * - _controller.value.aspectRatio; + double delta = MediaQuery.of(context).size.width - MediaQuery.of(context).size.height * _controller.value.aspectRatio; videoHeight = MediaQuery.of(context).size.width / _controller.value.aspectRatio; videoWidth = MediaQuery.of(context).size.width; @@ -133,21 +127,19 @@ class _VimeoPlayerState extends State { heightFactor: 6, child: CircularProgressIndicator( strokeWidth: 4, - valueColor: - AlwaysStoppedAnimation(Color(0xFF22A3D2)), + valueColor: AlwaysStoppedAnimation(Color(0xFF22A3D2)), )); } }), onTap: () { setState(() { _overlay = !_overlay; - if (_overlay){ + if (_overlay) { doubleTapRHeight = videoHeight - 36; doubleTapLHeight = videoHeight - 10; doubleTapRMargin = 36; doubleTapLMargin = 10; - } - else if (!_overlay){ + } else if (!_overlay) { doubleTapRHeight = videoHeight + 36; doubleTapLHeight = videoHeight + 16; doubleTapRMargin = 0; @@ -156,27 +148,27 @@ class _VimeoPlayerState extends State { }); }, ), - GestureDetector( //======= Перемотка назад =======// + GestureDetector( + //======= Перемотка назад =======// child: Container( width: doubleTapLWidth / 2 - 30, height: doubleTapLHeight - 46, margin: EdgeInsets.fromLTRB(0, 10, doubleTapLWidth / 2 + 30, doubleTapLMargin + 20), decoration: BoxDecoration( - //color: Colors.red, - ), + //color: Colors.red, + ), ), // Изменение размера блоков дабл тапа. Нужно для открытия кнопок // "Во весь экран" и "Качество" при включенном overlay onTap: () { setState(() { _overlay = !_overlay; - if (_overlay){ + if (_overlay) { doubleTapRHeight = videoHeight - 36; doubleTapLHeight = videoHeight - 10; doubleTapRMargin = 36; doubleTapLMargin = 10; - } - else if (!_overlay){ + } else if (!_overlay) { doubleTapRHeight = videoHeight + 36; doubleTapLHeight = videoHeight + 16; doubleTapRMargin = 0; @@ -184,30 +176,30 @@ class _VimeoPlayerState extends State { } }); }, - onDoubleTap:(){ + onDoubleTap: () { setState(() { _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds - 10)); }); - } - ), GestureDetector( - child: Container(//======= Перемотка вперед =======// + }), + GestureDetector( + child: Container( + //======= Перемотка вперед =======// width: doubleTapRWidth / 2 - 45, height: doubleTapRHeight - 60, - margin: EdgeInsets.fromLTRB(doubleTapRWidth / 2 + 45, doubleTapRMargin, 0, doubleTapRMargin+20), + margin: EdgeInsets.fromLTRB(doubleTapRWidth / 2 + 45, doubleTapRMargin, 0, doubleTapRMargin + 20), decoration: BoxDecoration( - //color: Colors.red, - ), + //color: Colors.red, + ), ), onTap: () { setState(() { _overlay = !_overlay; - if (_overlay){ + if (_overlay) { doubleTapRHeight = videoHeight - 36; doubleTapLHeight = videoHeight - 10; doubleTapRMargin = 36; doubleTapLMargin = 10; - } - else if (!_overlay){ + } else if (!_overlay) { doubleTapRHeight = videoHeight + 36; doubleTapLHeight = videoHeight + 16; doubleTapRMargin = 0; @@ -215,12 +207,11 @@ class _VimeoPlayerState extends State { } }); }, - onDoubleTap:(){ + onDoubleTap: () { setState(() { _controller.seekTo(Duration(seconds: _controller.value.position.inSeconds + 10)); }); - } - ), + }), ], )); } @@ -247,6 +238,7 @@ class _VimeoPlayerState extends State { })))); return Container( + color: Theme.of(context).backgroundColor, child: Wrap( children: children, ), @@ -268,10 +260,7 @@ class _VimeoPlayerState extends State { gradient: LinearGradient( begin: Alignment.centerRight, end: Alignment.centerLeft, - colors: [ - const Color(0x662F2C47), - const Color(0x662F2C47) - ], + colors: [const Color(0x662F2C47), const Color(0x662F2C47)], ), ), ), @@ -279,23 +268,16 @@ class _VimeoPlayerState extends State { ), Center( child: IconButton( - padding: EdgeInsets.only( - top: videoHeight / 2 - 30, - bottom: videoHeight / 2 - 30), - icon: _controller.value.isPlaying - ? Icon(Icons.pause, size: 60.0) - : Icon(Icons.play_arrow, size: 60.0), + padding: EdgeInsets.only(top: videoHeight / 2 - 30, bottom: videoHeight / 2 - 30), + icon: _controller.value.isPlaying ? Icon(Icons.pause, size: 60.0) : Icon(Icons.play_arrow, size: 60.0), onPressed: () { setState(() { - _controller.value.isPlaying - ? _controller.pause() - : _controller.play(); + _controller.value.isPlaying ? _controller.pause() : _controller.play(); }); }), ), Container( - margin: EdgeInsets.only( - top: videoHeight - 70, left: videoWidth + videoMargin - 50), + margin: EdgeInsets.only(top: videoHeight - 70, left: videoWidth + videoMargin - 50), child: IconButton( alignment: AlignmentDirectional.center, icon: Icon(Icons.fullscreen, size: 30.0), @@ -303,19 +285,24 @@ class _VimeoPlayerState extends State { setState(() { _controller.pause(); }); - position = await Navigator.push(context, PageRouteBuilder( - opaque: false, - pageBuilder: (BuildContext context, _, __) => FullscreenPlayer( - id: _id, autoPlay: true, controller: _controller, position: _controller.value.position.inSeconds, - initFuture: initFuture, qualityValue: _qualityValue), - transitionsBuilder: (___, Animation animation, ____, Widget child) { - print(animation); - return FadeTransition( - opacity: animation, - child: ScaleTransition(scale: animation, child: child), - ); - } - )); + position = await Navigator.push( + context, + PageRouteBuilder( + opaque: false, + pageBuilder: (BuildContext context, _, __) => FullscreenPlayer( + id: _id, + autoPlay: true, + controller: _controller, + position: _controller.value.position.inSeconds, + initFuture: initFuture, + qualityValue: _qualityValue), + transitionsBuilder: (___, Animation animation, ____, Widget child) { + print(animation); + return FadeTransition( + opacity: animation, + child: ScaleTransition(scale: animation, child: child), + ); + })); setState(() { _controller.play(); _seek = true; @@ -335,8 +322,7 @@ class _VimeoPlayerState extends State { ), Container( //===== Ползунок =====// - margin: EdgeInsets.only( - top: videoHeight - 26, left: videoMargin), //CHECK IT + margin: EdgeInsets.only(top: videoHeight - 26, left: videoMargin), //CHECK IT child: _videoOverlaySlider(), ) ], @@ -371,10 +357,7 @@ class _VimeoPlayerState extends State { Container( width: 46, alignment: Alignment(0, 0), - child: Text(value.position.inMinutes.toString() + - ':' + - (value.position.inSeconds - value.position.inMinutes * 60) - .toString()), + child: Text(value.position.inMinutes.toString() + ':' + (value.position.inSeconds - value.position.inMinutes * 60).toString()), ), Container( height: 20, @@ -393,10 +376,7 @@ class _VimeoPlayerState extends State { Container( width: 46, alignment: Alignment(0, 0), - child: Text(value.duration.inMinutes.toString() + - ':' + - (value.duration.inSeconds - value.duration.inMinutes * 60) - .toString()), + child: Text(value.duration.inMinutes.toString() + ':' + (value.duration.inSeconds - value.duration.inMinutes * 60).toString()), ), ], );