aurcache/frontend/lib/providers/api/package_provider.dart

21 lines
445 B
Dart
Raw Normal View History

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;
}
}