aurcache/frontend/lib/providers/aur_search_provider.dart
2024-02-11 23:05:39 +01:00

20 lines
424 B
Dart

import 'package:aurcache/api/aur.dart';
import 'package:aurcache/models/aur_package.dart';
import '../api/API.dart';
import 'BaseProvider.dart';
class AurSearchDTO {
final String query;
AurSearchDTO({required this.query});
}
class AURSearchProvider extends BaseProvider<List<AurPackage>, AurSearchDTO> {
@override
loadFuture(context, {dto}) {
data = API.getAurPackages(dto!.query);
this.dto = dto;
}
}