Commit 45446ae2 authored by xster's avatar xster Committed by GitHub

first round of future awaits (#10760)

parent e56c8850
......@@ -209,10 +209,13 @@ class FlutterVersion {
if (beenAWhileSinceWarningWasPrinted && installationSeemsOutdated && await newerFrameworkVersionAvailable()) {
printStatus(versionOutOfDateMessage(frameworkAge), emphasis: true);
stamp.store(
final Future<Null> saveWarningStampFuture = stamp.store(
newTimeWarningWasPrinted: _clock.now(),
);
await new Future<Null>.delayed(kPauseToLetUserReadTheMessage);
await Future.wait<Null>(<Future<Null>>[
saveWarningStampFuture,
new Future<Null>.delayed(kPauseToLetUserReadTheMessage),
]);
}
}
......@@ -254,6 +257,8 @@ class FlutterVersion {
try {
final String branch = _channel == 'alpha' ? 'alpha' : 'master';
final DateTime remoteFrameworkCommitDate = DateTime.parse(await FlutterVersion.fetchRemoteFrameworkCommitDate(branch));
// fire and forget since nothing subsequent depends on it. Hope there's a flush/sync mechanism.
// ignore: unawaited_futures
versionCheckStamp.store(
newTimeVersionWasChecked: _clock.now(),
newKnownRemoteVersion: remoteFrameworkCommitDate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment