chore: Update go_router configuration to use go_router_builder

This commit is contained in:
Anton Stubenbord
2023-10-08 16:42:42 +02:00
parent a17b041a0d
commit d4951e1c82
44 changed files with 388 additions and 437 deletions

View File

@@ -185,7 +185,7 @@ class DocumentFilter extends Equatable {
added.matches(document.added) &&
modified.matches(document.modified) &&
query.matches(
title: document.title,
title: document.title ?? '',
content: document.content,
asn: document.archiveSerialNumber,
);

View File

@@ -26,7 +26,7 @@ class DocumentModel extends Equatable {
static const storagePathKey = 'storage_path';
final int id;
final String title;
final String? title;
final String? content;
final Iterable<int> tags;
final int? documentType;
@@ -71,7 +71,8 @@ class DocumentModel extends Equatable {
this.permissions,
});
factory DocumentModel.fromJson(Map<String, dynamic> json) => _$DocumentModelFromJson(json);
factory DocumentModel.fromJson(Map<String, dynamic> json) =>
_$DocumentModelFromJson(json);
Map<String, dynamic> toJson() => _$DocumentModelToJson(this);
@@ -94,15 +95,17 @@ class DocumentModel extends Equatable {
title: title ?? this.title,
content: content ?? this.content,
documentType: documentType != null ? documentType() : this.documentType,
correspondent: correspondent != null ? correspondent() : this.correspondent,
correspondent:
correspondent != null ? correspondent() : this.correspondent,
storagePath: storagePath != null ? storagePath() : this.storagePath,
tags: tags ?? this.tags,
created: created ?? this.created,
modified: modified ?? this.modified,
added: added ?? this.added,
originalFileName: originalFileName ?? this.originalFileName,
archiveSerialNumber:
archiveSerialNumber != null ? archiveSerialNumber() : this.archiveSerialNumber,
archiveSerialNumber: archiveSerialNumber != null
? archiveSerialNumber()
: this.archiveSerialNumber,
archivedFileName: archivedFileName ?? this.archivedFileName,
);
}