Bug: showing bottom filter a second time fails

This commit is contained in:
Hillel Coren 2023-11-29 17:50:01 +02:00
parent bbc4a2feb5
commit 1d479a8d6a
1 changed files with 7 additions and 10 deletions

View File

@ -143,8 +143,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
if (closeBottomSheet() == kFilterStatePanel) { if (closeBottomSheet() == kFilterStatePanel) {
return; return;
} }
_filterStateController = _filterStateController = Scaffold.of(context).showBottomSheet((context) {
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
return StoreConnector<AppState, BuiltList<EntityState>>( return StoreConnector<AppState, BuiltList<EntityState>>(
converter: (Store<AppState> store) => converter: (Store<AppState> store) =>
store.state.getListState(widget.entityType).stateFilters, store.state.getListState(widget.entityType).stateFilters,
@ -185,8 +184,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return; return;
} }
_filterStatusController = _filterStatusController = Scaffold.of(context).showBottomSheet((context) {
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
return StoreConnector<AppState, BuiltList<EntityStatus>>( return StoreConnector<AppState, BuiltList<EntityStatus>>(
converter: (Store<AppState> store) => converter: (Store<AppState> store) =>
store.state.getListState(widget.entityType).statusFilters, store.state.getListState(widget.entityType).statusFilters,
@ -226,8 +224,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return; return;
} }
_sortController = _sortController = Scaffold.of(context).showBottomSheet((context) {
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
return StoreConnector<AppState, ListUIState>( return StoreConnector<AppState, ListUIState>(
//distinct: true, //distinct: true,
converter: (Store<AppState> store) => converter: (Store<AppState> store) =>
@ -284,7 +281,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
} }
_filterCustom1Controller = _filterCustom1Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) { Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector( return CustomFieldSelector(
customNumber: 1, customNumber: 1,
entityType: widget.entityType, entityType: widget.entityType,
@ -304,7 +301,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return; return;
} }
_filterCustom2Controller = _filterCustom2Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) { Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector( return CustomFieldSelector(
customNumber: 2, customNumber: 2,
entityType: widget.entityType, entityType: widget.entityType,
@ -325,7 +322,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
} }
_filterCustom3Controller = _filterCustom3Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) { Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector( return CustomFieldSelector(
customNumber: 3, customNumber: 3,
entityType: widget.entityType, entityType: widget.entityType,
@ -346,7 +343,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
} }
_filterCustom4Controller = _filterCustom4Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) { Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector( return CustomFieldSelector(
customNumber: 4, customNumber: 4,
entityType: widget.entityType, entityType: widget.entityType,