Resetting filter doesn't reset sorting, some bugfixes and UI updates

This commit is contained in:
Anton Stubenbord
2022-12-14 17:57:01 +01:00
parent a3c3810d35
commit 4bf4ff1cbd
23 changed files with 327 additions and 253 deletions

View File

@@ -88,6 +88,13 @@ class DocumentsCubit extends Cubit<DocumentsState> {
emit(DocumentsState(filter: filter, value: [result], isLoaded: true));
}
Future<void> resetFilter() async {
final filter = DocumentFilter.initial.copyWith(
sortField: state.filter.sortField,
sortOrder: state.filter.sortOrder,
);
}
///
/// Convenience method which allows to directly use [DocumentFilter.copyWith] on the current filter.
///