aurcache/frontend/lib/providers/package_provider.dart
2024-02-11 23:05:39 +01:00

21 lines
439 B
Dart

import 'package:aurcache/api/packages.dart';
import '../api/API.dart';
import '../models/package.dart';
import 'BaseProvider.dart';
class PackageDTO {
final int pkgID;
PackageDTO({required this.pkgID});
}
class PackageProvider extends BaseProvider<Package, PackageDTO> {
@override
loadFuture(context, {dto}) {
// todo search solution to force an exising dto
data = API.getPackage(dto!.pkgID);
this.dto = dto;
}
}