Remove duplicate global declaration of UserMessages (#142281)

Fixes https://github.com/flutter/flutter/issues/142286

This is a refactor. No code behavior changes should be observed.
This commit is contained in:
Andrew Kolos
2024-01-26 13:41:16 -08:00
committed by GitHub
parent 6d436dfaa5
commit 69c98bd960
14 changed files with 28 additions and 42 deletions

View File

@@ -6,7 +6,6 @@ import 'package:process/process.dart';
import '../base/file_system.dart';
import '../base/platform.dart';
import '../base/user_messages.dart';
import '../doctor_validator.dart';
import 'vscode.dart';
@@ -27,8 +26,8 @@ class VsCodeValidator extends DoctorValidator {
List<ValidationMessage>.from(_vsCode.validationMessages);
final String vsCodeVersionText = _vsCode.version == null
? userMessages.vsCodeVersion('unknown')
: userMessages.vsCodeVersion(_vsCode.version.toString());
? 'version unknown'
: 'version ${_vsCode.version}';
if (_vsCode.version == null) {
validationMessages.add(const ValidationMessage.error('Unable to determine VS Code version.'));