mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
28
lib/models/search_model.dart
Normal file
28
lib/models/search_model.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import 'package:fladder/models/item_base_model.dart';
|
||||
|
||||
class SearchModel {
|
||||
final bool loading;
|
||||
final String searchQuery;
|
||||
final int resultCount;
|
||||
final Map<FladderItemType, List<ItemBaseModel>> results;
|
||||
SearchModel({
|
||||
this.loading = false,
|
||||
this.searchQuery = "",
|
||||
this.resultCount = 0,
|
||||
this.results = const {},
|
||||
});
|
||||
|
||||
SearchModel copyWith({
|
||||
bool? loading,
|
||||
String? searchQuery,
|
||||
int? resultCount,
|
||||
Map<FladderItemType, List<ItemBaseModel>>? results,
|
||||
}) {
|
||||
return SearchModel(
|
||||
loading: loading ?? this.loading,
|
||||
searchQuery: searchQuery ?? this.searchQuery,
|
||||
resultCount: resultCount ?? this.resultCount,
|
||||
results: results ?? this.results,
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue