From b2eb807019bc3962aba81f262d369aea22630afb Mon Sep 17 00:00:00 2001 From: Amit Mondal Date: Wed, 21 Jun 2023 23:50:10 +0530 Subject: [PATCH] imagePath null check fixes & deprecate iterable_contains_unrelated_type and list_remove_unrelated_type analysis_options replaced by collection_methods_unrelated_type --- analysis_options.yaml | 3 +-- lib/src/system_screen_capturer_impl_windows.dart | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index a6633d4..1ce3f46 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -10,8 +10,7 @@ linter: control_flow_in_finally: true empty_statements: true hash_and_equals: true - iterable_contains_unrelated_type: true - list_remove_unrelated_type: true + collection_methods_unrelated_type: true no_duplicate_case_values: true prefer_void_to_null: true unrelated_type_equality_checks: true diff --git a/lib/src/system_screen_capturer_impl_windows.dart b/lib/src/system_screen_capturer_impl_windows.dart index 5b65066..d0bcced 100644 --- a/lib/src/system_screen_capturer_impl_windows.dart +++ b/lib/src/system_screen_capturer_impl_windows.dart @@ -77,7 +77,7 @@ class SystemScreenCapturerImplWindows extends SystemScreenCapturer { bool silent = true, }) async { if (mode == CaptureMode.screen) { - assert(imagePath == null); + assert(imagePath != null); await ScreenCapturerPlatform.instance.captureScreen( imagePath: imagePath!, );