Explorar o código

Await only futures

Ben Hagen %!s(int64=6) %!d(string=hai) anos
pai
achega
60f34322b7
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 0
      analysis_options.yaml
  2. 1 1
      lib/src/chewie_player.dart

+ 1 - 0
analysis_options.yaml

@@ -5,6 +5,7 @@ analyzer:
 
 linter:
   rules:
+    - await_only_futures
     - cancel_subscriptions
     - close_sinks
     - hash_and_equals

+ 1 - 1
lib/src/chewie_player.dart

@@ -266,7 +266,7 @@ class ChewieController extends ChangeNotifier {
 
     if (fullScreenByDefault) {
       videoPlayerController.addListener(() async {
-        if (await videoPlayerController.value.isPlaying && !_isFullScreen) {
+        if (videoPlayerController.value.isPlaying && !_isFullScreen) {
           enterFullScreen();
         }
       });