Make non-global constants have consistent naming (with just _ instead of _k) (#17584)
Our style guide says the k's are not necessary, and it seems like a good idea to make all the code be consistent on this.
Only naming changes to private vars: no logic changes.
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
index cd4a1db..22c37f3 100644
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -135,7 +135,7 @@
/// In the absence of bugs and crashes a Flutter developer should never see
/// this remote appear in their `git remote` list, but also if it happens to
/// persist we do the proper clean-up for extra robustness.
- static const String _kVersionCheckRemote = '__flutter_version_check__';
+ static const String _versionCheckRemote = '__flutter_version_check__';
/// The date of the latest framework commit in the remote repository.
///
@@ -148,11 +148,11 @@
'git',
'remote',
'add',
- _kVersionCheckRemote,
+ _versionCheckRemote,
'https://github.com/flutter/flutter.git',
]);
- await _run(<String>['git', 'fetch', _kVersionCheckRemote, branch]);
- return _latestGitCommitDate('$_kVersionCheckRemote/$branch');
+ await _run(<String>['git', 'fetch', _versionCheckRemote, branch]);
+ return _latestGitCommitDate('$_versionCheckRemote/$branch');
} finally {
await _removeVersionCheckRemoteIfExists();
}
@@ -163,8 +163,8 @@
.split('\n')
.map((String name) => name.trim()) // to account for OS-specific line-breaks
.toList();
- if (remotes.contains(_kVersionCheckRemote))
- await _run(<String>['git', 'remote', 'remove', _kVersionCheckRemote]);
+ if (remotes.contains(_versionCheckRemote))
+ await _run(<String>['git', 'remote', 'remove', _versionCheckRemote]);
}
static FlutterVersion get instance => context[FlutterVersion];