forked from firka/flutter
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:
@@ -2,18 +2,14 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'context.dart';
|
||||
import 'platform.dart';
|
||||
|
||||
/// Contains messages produced by Flutter tools.
|
||||
/// Class containing some message strings that can be produced by Flutter tools.
|
||||
//
|
||||
// This allows partial reimplementations of the flutter tool to override
|
||||
// certain messages.
|
||||
// TODO(andrewkolos): It is unclear if this is worth keeping. See
|
||||
// https://github.com/flutter/flutter/issues/125155.
|
||||
UserMessages get userMessages => context.get<UserMessages>()!;
|
||||
|
||||
/// Class containing message strings that can be produced by Flutter tools.
|
||||
class UserMessages {
|
||||
// Messages used in multiple components.
|
||||
String get flutterToolBugInstructions =>
|
||||
@@ -211,11 +207,6 @@ class UserMessages {
|
||||
'$consequence\n'
|
||||
'To re-install $reinstallInstructions';
|
||||
|
||||
// Messages used in VsCodeValidator
|
||||
String vsCodeVersion(String version) => 'version $version';
|
||||
String vsCodeLocation(String location) => 'VS Code at $location';
|
||||
String vsCodeFlutterExtensionMissing(String url) => 'Flutter extension not installed; install from\n$url';
|
||||
|
||||
// Messages used in VisualStudioValidator
|
||||
String visualStudioVersion(String name, String version) => '$name version $version';
|
||||
String visualStudioLocation(String location) => 'Visual Studio at $location';
|
||||
|
||||
Reference in New Issue
Block a user