From 1ea72163b2fcd58debfc23f1cd5e8009f12c73ab Mon Sep 17 00:00:00 2001 From: Anurag Roy Date: Sat, 11 Jun 2022 02:08:07 +0530 Subject: [PATCH] [flutter_tools] Remove redundant/unused code in version.dart (#105111) --- packages/flutter_tools/lib/src/version.dart | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart index deabee8ea9..dc47f17057 100644 --- a/packages/flutter_tools/lib/src/version.dart +++ b/packages/flutter_tools/lib/src/version.dart @@ -273,7 +273,7 @@ class FlutterVersion { /// /// Throws [VersionCheckError] if a git command fails, for example, when the /// remote git repository is not reachable due to a network issue. - static Future fetchRemoteFrameworkCommitDate(String branch) async { + static Future fetchRemoteFrameworkCommitDate() async { try { // Fetch upstream branch's commit and tags await _run(['git', 'fetch', '--tags']); @@ -360,7 +360,7 @@ class FlutterVersion { // Cache is empty or it's been a while since the last server ping. Ping the server. try { final DateTime remoteFrameworkCommitDate = DateTime.parse( - await FlutterVersion.fetchRemoteFrameworkCommitDate(channel), + await FlutterVersion.fetchRemoteFrameworkCommitDate(), ); await versionCheckStamp.store( newTimeVersionWasChecked: now, @@ -926,11 +926,6 @@ class VersionFreshnessValidator { /// Execute validations and print warning to [logger] if necessary. Future run() async { - // Don't perform update checks if we're not on an official channel. - if (!kOfficialChannels.contains(version.channel)) { - return; - } - // Get whether there's a newer version on the remote. This only goes // to the server if we haven't checked recently so won't happen on every // command.