Selaa lähdekoodia

Be consistent when naming methods and variables

Ben Hagen 6 vuotta sitten
vanhempi
commit
c5536969b5

+ 1 - 1
example/lib/main.dart

@@ -85,7 +85,7 @@ class _ChewieDemoState extends State<ChewieDemo> {
             ),
             FlatButton(
               onPressed: () {
-                _chewieController.enterFullscreen();
+                _chewieController.enterFullScreen();
               },
               child: Text('Fullscreen'),
             ),

+ 6 - 6
lib/src/chewie_player.dart

@@ -118,7 +118,7 @@ class ChewieState extends State<Chewie> {
 
     await Navigator.of(context).push(route);
     _isFullScreen = false;
-    widget.controller.exitFullscreen();
+    widget.controller.exitFullScreen();
 
     bool isKeptOn = await Screen.isKeptOn;
     if (isKeptOn) {
@@ -236,7 +236,7 @@ class ChewieController extends ChangeNotifier {
 
     if (autoPlay) {
       if (fullScreenByDefault) {
-        enterFullscreen();
+        enterFullScreen();
       }
 
       await videoPlayerController.play();
@@ -249,23 +249,23 @@ class ChewieController extends ChangeNotifier {
     if (fullScreenByDefault) {
       videoPlayerController.addListener(() async {
         if (await videoPlayerController.value.isPlaying && !_isFullScreen) {
-          enterFullscreen();
+          enterFullScreen();
         }
       });
     }
   }
 
-  void enterFullscreen() {
+  void enterFullScreen() {
     _isFullScreen = true;
     notifyListeners();
   }
 
-  void exitFullscreen() {
+  void exitFullScreen() {
     _isFullScreen = false;
     notifyListeners();
   }
 
-  void toggleFullscreen() {
+  void toggleFullScreen() {
     _isFullScreen = !_isFullScreen;
     notifyListeners();
   }

+ 1 - 1
lib/src/cupertino_controls.dart

@@ -417,7 +417,7 @@ class _CupertinoControlsState extends State<CupertinoControls> {
     setState(() {
       _hideStuff = true;
 
-      chewieController.toggleFullscreen();
+      chewieController.toggleFullScreen();
       _expandCollapseTimer = Timer(Duration(milliseconds: 300), () {
         setState(() {
           _cancelAndRestartTimer();

+ 1 - 1
lib/src/material_controls.dart

@@ -272,7 +272,7 @@ class _MaterialControlsState extends State<MaterialControls> {
     setState(() {
       _hideStuff = true;
 
-      chewieController.toggleFullscreen();
+      chewieController.toggleFullScreen();
       _showAfterExpandCollapseTimer = Timer(Duration(milliseconds: 300), () {
         setState(() {
           _cancelAndRestartTimer();