increaseDownloads method
Implementation
@override
FutureOr<void> increaseDownloads(String name, String version) async {
final existing = await query(name);
if (existing == null) {
throw StateError('$name not exist!');
}
final downloads = (existing.downloads ?? 0) + 1;
await _upsert(
existing.copyWith(
downloads: downloads,
updatedAt: DateTime.now(),
),
);
}