aurcache/frontend/lib/providers/package_provider.dart

20 lines
419 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);
}
}