checkForUpdates method
checks if there is an update available for the tool
Implementation
Future<void> checkForUpdates() async {
try {
final latestVersion =
await di<PubUpdater>().getLatestVersion(Constants.packageName);
final isUpToDate = packageVersion == latestVersion;
if (!isUpToDate) {
di<Logger>().info(formatUpdate(packageVersion, latestVersion));
}
} catch (_) {}
}