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

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