|
|
@@ -103,10 +103,10 @@ class ChewieState extends State<Chewie> {
|
|
|
}
|
|
|
|
|
|
Widget _fullScreenRoutePageBuilder(
|
|
|
- BuildContext context,
|
|
|
- Animation<double> animation,
|
|
|
- Animation<double> secondaryAnimation,
|
|
|
- ) {
|
|
|
+ BuildContext context,
|
|
|
+ Animation<double> animation,
|
|
|
+ Animation<double> secondaryAnimation,
|
|
|
+ ) {
|
|
|
var controllerProvider = _ChewieControllerProvider(
|
|
|
controller: widget.controller,
|
|
|
child: PlayerWithControls(),
|
|
|
@@ -128,12 +128,10 @@ class ChewieState extends State<Chewie> {
|
|
|
);
|
|
|
|
|
|
SystemChrome.setEnabledSystemUIOverlays([]);
|
|
|
- if (isAndroid) {
|
|
|
- SystemChrome.setPreferredOrientations([
|
|
|
- DeviceOrientation.landscapeLeft,
|
|
|
- DeviceOrientation.landscapeRight,
|
|
|
- ]);
|
|
|
- }
|
|
|
+ SystemChrome.setPreferredOrientations([
|
|
|
+ DeviceOrientation.landscapeLeft,
|
|
|
+ DeviceOrientation.landscapeRight,
|
|
|
+ ]);
|
|
|
|
|
|
if (!widget.controller.allowedScreenSleep) {
|
|
|
Wakelock.enable();
|
|
|
@@ -194,7 +192,7 @@ class ChewieController extends ChangeNotifier {
|
|
|
],
|
|
|
this.routePageBuilder = null,
|
|
|
}) : assert(videoPlayerController != null,
|
|
|
- 'You must provide a controller to play a video') {
|
|
|
+ 'You must provide a controller to play a video') {
|
|
|
_initialize();
|
|
|
}
|
|
|
|
|
|
@@ -274,8 +272,8 @@ class ChewieController extends ChangeNotifier {
|
|
|
|
|
|
static ChewieController of(BuildContext context) {
|
|
|
final chewieControllerProvider =
|
|
|
- context.inheritFromWidgetOfExactType(_ChewieControllerProvider)
|
|
|
- as _ChewieControllerProvider;
|
|
|
+ context.inheritFromWidgetOfExactType(_ChewieControllerProvider)
|
|
|
+ as _ChewieControllerProvider;
|
|
|
|
|
|
return chewieControllerProvider.controller;
|
|
|
}
|
|
|
@@ -366,4 +364,4 @@ class _ChewieControllerProvider extends InheritedWidget {
|
|
|
@override
|
|
|
bool updateShouldNotify(_ChewieControllerProvider old) =>
|
|
|
controller != old.controller;
|
|
|
-}
|
|
|
+}
|