[flutter_tools] replace MockFlutterVersion usage with fake where possible, move from context (#77390)

This commit is contained in:
Jonah Williams
2021-03-05 14:04:03 -08:00
committed by GitHub
parent db162a47f3
commit 721702717d
14 changed files with 153 additions and 168 deletions

View File

@@ -720,7 +720,7 @@ class FlutterValidator extends DoctorValidator {
messages.add(ValidationMessage(_userMessages.flutterRevision(
version.frameworkRevisionShort,
version.frameworkAge,
version.frameworkDate,
version.frameworkCommitDate,
)));
messages.add(ValidationMessage(_userMessages.engineRevision(version.engineRevisionShort)));
messages.add(ValidationMessage(_userMessages.dartRevision(version.dartSdkVersion)));

View File

@@ -144,8 +144,6 @@ class FlutterVersion {
String _frameworkVersion;
String get frameworkVersion => _frameworkVersion;
String get frameworkDate => frameworkCommitDate;
String get dartSdkVersion => globals.cache.dartSdkVersion;
String get engineRevision => globals.cache.engineRevision;
@@ -181,6 +179,8 @@ class FlutterVersion {
'dartSdkVersion': dartSdkVersion,
};
String get frameworkDate => frameworkCommitDate;
/// A date String describing the last framework commit.
///
/// If a git command fails, this will return a placeholder date.