2023-12-30 21:23:42 +00:00
|
|
|
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);
|
2024-02-11 22:05:39 +00:00
|
|
|
this.dto = dto;
|
2023-12-30 21:23:42 +00:00
|
|
|
}
|
|
|
|
}
|