2023-12-30 21:23:42 +00:00
|
|
|
import 'package:aurcache/api/packages.dart';
|
|
|
|
|
2024-02-16 21:37:35 +00:00
|
|
|
import '../../api/API.dart';
|
|
|
|
import '../../models/package.dart';
|
2023-12-30 21:23:42 +00:00
|
|
|
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);
|
2024-02-11 22:05:39 +00:00
|
|
|
this.dto = dto;
|
2023-12-30 21:23:42 +00:00
|
|
|
}
|
|
|
|
}
|