RemoteUpdateSource class

Fetches release metadata from an HTTP endpoint returning JSON such as:

{
  "latest": {"stable": "2.1.0", "beta": "2.2.0"},
  "minimum": "1.9.0",
  "notes": {"2.1.0": "Bug fixes and improvements"},
  "urls": {"android": "https://example.com/app.apk"}
}
Implemented types

Constructors

RemoteUpdateSource({required Uri url, Client? client, Map<String, String>? headers})
Creates a remote source.

Properties

hashCode → int
The hash code for this object.
no setterinherited
lastPayload ↔ Map<String, dynamic>
The last raw payload fetched, useful for custom fields.
getter/setter pair
minimumVersion → PrismVersion?
Minimum version from the payload, when present.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → Uri
The metadata endpoint URL.
final

Methods

downloadUrlFor(String platform) → Uri?
Download URL for platform key (e.g. android, windows, ios), when the payload contains a urls map.
fetchLatest() → Future<Map<UpdateChannel, PrismVersion>>
Fetches the latest version per channel.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notesFor(PrismVersion version) → String?
Release notes for a version, when the payload contains a notes map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited