diff --git a/analysis_options.yaml b/analysis_options.yaml index 84a7d94b09..b43a755b4f 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -141,7 +141,7 @@ linter: # - prefer_function_declarations_over_variables # not yet tested - prefer_generic_function_type_aliases # - prefer_if_elements_to_conditional_expressions # not yet tested - # - prefer_if_null_operators # not yet tested + - prefer_if_null_operators - prefer_initializing_formals - prefer_inlined_adds # - prefer_int_literals # not yet tested diff --git a/packages/flutter_tools/test/windows/visual_studio_test.dart b/packages/flutter_tools/test/windows/visual_studio_test.dart index 198ae583dd..0969f16ab2 100644 --- a/packages/flutter_tools/test/windows/visual_studio_test.dart +++ b/packages/flutter_tools/test/windows/visual_studio_test.dart @@ -41,18 +41,17 @@ void main() { final MockProcessResult result = MockProcessResult(); when(result.exitCode).thenReturn(0); - when(result.stdout).thenReturn(response == null - ? json.encode(>[ - { - 'installationPath': visualStudioPath, - 'displayName': 'Visual Studio Community 2017', - 'installationVersion': '15.9.28307.665', - 'catalog': { - 'productDisplayVersion': '15.9.12', - }, - } - ]) - : response); + when(result.stdout).thenReturn(response ?? + json.encode(>[ + { + 'installationPath': visualStudioPath, + 'displayName': 'Visual Studio Community 2017', + 'installationVersion': '15.9.28307.665', + 'catalog': { + 'productDisplayVersion': '15.9.12', + }, + }, + ])); final List requirementArguments = requiredComponents == null ? []