-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#691): add numbers behind filter menu items
* Moves withFilterData up to fix that cubit is closed when closing the drawer * Refactors check whether to get lookups for better debugging
- Loading branch information
Showing
7 changed files
with
198 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
app/lib/common/widgets/drug_search/filter_data_wrapper.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:provider/provider.dart'; | ||
|
||
import '../../module.dart'; | ||
|
||
Widget withFilterData({ | ||
required DrugListCubit cubit, | ||
required Widget Function( | ||
BuildContext context, | ||
DrugListCubit cubit, | ||
DrugListState state, | ||
ActiveDrugs activeDrugs, | ||
) builder, | ||
}) => Consumer<ActiveDrugs>( | ||
builder: (context, activeDrugs, child) => BlocProvider( | ||
create: (context) => cubit, | ||
child: BlocBuilder<DrugListCubit, DrugListState>( | ||
builder: (context, state) => builder(context, cubit, state, activeDrugs), | ||
), | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.