mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-11 06:08:04 -06:00
feat: Start implementing tags query form field
This commit is contained in:
@@ -57,3 +57,45 @@ class IdQueryParameter extends Equatable {
|
||||
factory IdQueryParameter.fromJson(Map<String, dynamic> json) =>
|
||||
_$IdQueryParameterFromJson(json);
|
||||
}
|
||||
// @freezed
|
||||
// class IdQueryParameter with _$IdQueryParameter {
|
||||
// const IdQueryParameter._();
|
||||
// const factory IdQueryParameter.unset() = _UnsetIdQueryParameter;
|
||||
// const factory IdQueryParameter.notAssigned() = _NotAssignedIdQueryParameter;
|
||||
// const factory IdQueryParameter.anyAssigned() = _AnyAssignedIdQueryParameter;
|
||||
// const factory IdQueryParameter.id(int id) = _SetIdQueryParameter;
|
||||
|
||||
// Map<String, String> toQueryParameter(String field) {
|
||||
// return when(
|
||||
// unset: () => {},
|
||||
// notAssigned: () => {
|
||||
// '${field}__isnull': '1',
|
||||
// },
|
||||
// anyAssigned: () => {
|
||||
// '${field}__isnull': '0',
|
||||
// },
|
||||
// id: (id) => {
|
||||
// '${field}_id': '$id',
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
// bool get onlyNotAssigned => this is _NotAssignedIdQueryParameter;
|
||||
|
||||
// bool get onlyAssigned => this is _AnyAssignedIdQueryParameter;
|
||||
|
||||
// bool get isSet => this is _SetIdQueryParameter;
|
||||
|
||||
// bool get isUnset => this is _UnsetIdQueryParameter;
|
||||
// bool matches(int? id) {
|
||||
// return when(
|
||||
// unset: () => true,
|
||||
// notAssigned: () => id == null,
|
||||
// anyAssigned: () => id != null,
|
||||
// id: (id_) => id == id_,
|
||||
// );
|
||||
// }
|
||||
|
||||
// factory IdQueryParameter.fromJson(Map<String, dynamic> json) =>
|
||||
// _$IdQueryParameterFromJson(json);
|
||||
// }
|
||||
|
||||
@@ -20,6 +20,7 @@ dependencies:
|
||||
dio: ^5.0.0
|
||||
collection: ^1.17.0
|
||||
jiffy: ^5.0.0
|
||||
freezed_annotation: ^2.2.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
@@ -27,6 +28,7 @@ dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
json_serializable: ^6.5.4
|
||||
build_runner: ^2.3.2
|
||||
freezed: ^2.3.2
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
Reference in New Issue
Block a user