DownloadStats class
Aggregated download counts, as returned by the downloads API.
Computed by OmnyStore.downloadStats over DownloadRecords. The breakdowns
are what a release dashboard renders: adoption per version tells you whether
a rollout is progressing, per platform tells you which builds matter.
- Annotations
-
- @immutable
- @JsonSerializable.new(explicitToJson: true)
Constructors
-
DownloadStats({required int total, Map<
String, int> byVersion = const {}, Map<String, int> byAsset = const {}, DateTime? from, DateTime? to}) - Creates aggregated statistics. Maps are copied into unmodifiable views.
-
DownloadStats.fromJson(Map<
String, dynamic> json) -
Parses statistics from a JSON map.
factory
Properties
-
byAsset
→ Map<
String, int> -
Downloads per asset id.
final
-
byVersion
→ Map<
String, int> -
Downloads per version string, newest-first ordering left to the caller.
final
- from → DateTime?
-
The window these statistics cover (UTC), or
nullfor all time.final - hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- to → DateTime?
-
The end of the window (UTC), or
nullfor "up to now".final - total → int
-
Total downloads counted.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialises the statistics to a JSON map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override