Fixed FABs stacking on form fields, some other minor improvements

This commit is contained in:
Anton Stubenbord
2022-11-01 23:29:16 +01:00
parent f522991059
commit b4e5bf06b2
14 changed files with 313 additions and 279 deletions

View File

@@ -43,15 +43,14 @@ class CorrespondentWidget extends StatelessWidget {
}
void _addCorrespondentToFilter(BuildContext context) {
final cubit = getIt<DocumentsCubit>();
final cubit = BlocProvider.of<DocumentsCubit>(context);
if (cubit.state.filter.correspondent.id == correspondentId) {
cubit.updateFilter(
filter: cubit.state.filter.copyWith(correspondent: const CorrespondentQuery.unset()));
cubit.updateCurrentFilter(
(filter) => filter.copyWith(correspondent: const CorrespondentQuery.unset()),
);
} else {
cubit.updateFilter(
filter: cubit.state.filter.copyWith(
correspondent: CorrespondentQuery.fromId(correspondentId),
),
cubit.updateCurrentFilter(
(filter) => filter.copyWith(correspondent: CorrespondentQuery.fromId(correspondentId)),
);
}
afterSelected?.call();