瀏覽代碼

Await only futures

Ben Hagen 6 年之前
父節點
當前提交
60f34322b7
共有 2 個文件被更改,包括 2 次插入1 次删除
  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();
         }
       });