checkForUpdates method
Future<UpdateInfo>
checkForUpdates({
- required String packageReference,
- required Version currentVersion,
- ReleaseChannel? channel,
- String? platform,
override
Answers "is there a newer version of packageReference than
currentVersion, on channel, for platform?".
channel defaults to the package's own defaultChannel, so a client that
does not opt in to pre-releases is never offered one. A client already
current — or ahead, as a developer running a local build is — gets
updateAvailable: false rather than an error.
Implementation
@override
Future<UpdateInfo> checkForUpdates({
required String packageReference,
required Version currentVersion,
ReleaseChannel? channel,
String? platform,
}) async => UpdateInfo.fromJson(
await _result(StoreProtocol.updateCheck, {
'packageReference': packageReference,
'version': currentVersion.toString(),
'channel': ?channel?.name,
'platform': ?platform,
}),
);