latestChannel method

  1. @override
Future<Release?> latestChannel(
  1. String packageReference,
  2. ReleaseChannel channel, {
  3. bool exact = false,
})
override

The newest release of packageReference a client on channel would accept, or null.

Inclusive downward in stability: a beta subscriber is offered a newer stable release when one exists, which is what makes promotion work without re-publishing. Pass exact: true for the strict single-channel reading.

Implementation

@override
Future<Release?> latestChannel(
  String packageReference,
  ReleaseChannel channel, {
  bool exact = false,
}) async => _maybe(
  await _call(StoreProtocol.releaseLatest, {
    'packageReference': packageReference,
    'channel': channel.name,
    'exact': exact,
  }),
  Release.fromJson,
);