parent
427e06be3e
commit
a54004736b
1 changed files with 427 additions and 143 deletions
21
lib/models/requests/search.dart
Normal file
21
lib/models/requests/search.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||
import "package:freezed_annotation/freezed_annotation.dart";
|
||||
|
||||
part "search.freezed.dart";
|
||||
part "search.g.dart";
|
||||
|
||||
@Freezed(toJson: false, fromJson: false)
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class const SearchRequest({
|
||||
required final String searchTerm,
|
||||
final IList<String> roomIds = const .empty(),
|
||||
final int limit = 20,
|
||||
final bool sortByTime = true,
|
||||
|
||||
final String? nextBatch,
|
||||
}) with _$SearchRequest {
|
||||
Map<String, Object?> toJson() => _$SearchRequestToJson(this);
|
||||
|
||||
factory SearchRequest.fromJson(Map<String, Object?> json) =>
|
||||
_$SearchRequestFromJson(json);
|
||||
}
|
||||
Loading…
Reference in a new issue