aurcache/frontend/lib/providers/aur_search_provider.dart

20 lines
424 B
Dart
Raw Normal View History

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