mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 20:07:55 -06:00
feat: Migrate to go_router
This commit is contained in:
@@ -57,6 +57,11 @@ class DocumentEditCubit extends Cubit<DocumentEditState> {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> loadFieldSuggestions() async {
|
||||
final suggestions = await _docsApi.findSuggestions(state.document);
|
||||
emit(state.copyWith(suggestions: suggestions));
|
||||
}
|
||||
|
||||
void replace(DocumentModel document) {
|
||||
emit(state.copyWith(document: document));
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ part of 'document_edit_cubit.dart';
|
||||
class DocumentEditState with _$DocumentEditState {
|
||||
const factory DocumentEditState({
|
||||
required DocumentModel document,
|
||||
FieldSuggestions? suggestions,
|
||||
@Default({}) Map<int, Correspondent> correspondents,
|
||||
@Default({}) Map<int, DocumentType> documentTypes,
|
||||
@Default({}) Map<int, StoragePath> storagePaths,
|
||||
|
||||
Reference in New Issue
Block a user