2023-12-30 21:23:42 +00:00
|
|
|
import 'package:aurcache/api/packages.dart';
|
|
|
|
import 'package:aurcache/providers/BaseProvider.dart';
|
|
|
|
|
|
|
|
import '../api/API.dart';
|
2024-01-19 19:00:10 +00:00
|
|
|
import '../models/package.dart';
|
2023-12-30 21:23:42 +00:00
|
|
|
|
2024-01-19 19:00:10 +00:00
|
|
|
class PackagesDTO {
|
|
|
|
final int limit;
|
|
|
|
|
|
|
|
PackagesDTO({required this.limit});
|
|
|
|
}
|
|
|
|
|
|
|
|
class PackagesProvider extends BaseProvider<List<Package>, PackagesDTO> {
|
2023-12-30 21:23:42 +00:00
|
|
|
@override
|
|
|
|
loadFuture(context, {dto}) {
|
2024-01-19 19:00:10 +00:00
|
|
|
data = API.listPackages(limit: dto?.limit);
|
2024-02-11 22:05:39 +00:00
|
|
|
this.dto = dto;
|
2023-12-30 21:23:42 +00:00
|
|
|
}
|
|
|
|
}
|