Skip to content

Commit beefe6f

Browse files
committed
fix(headlines-feed): update filter map to use usage name as key
- Modify the filter map creation in CountriesFilterBloc - Change from using a fixed 'usage' key to using the usage name as the key - Set the value of the dynamic key to true
1 parent 38cda9d commit beefe6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/headlines-feed/bloc/countries_filter_bloc.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CountriesFilterBloc
6666
try {
6767
// Build the filter map based on the provided usage.
6868
final filter = event.usage != null
69-
? <String, dynamic>{'usage': event.usage}
69+
? <String, dynamic>{event.usage!.name: true}
7070
: null;
7171

7272
// Fetch countries. The API for 'usage' filters is not paginated,

0 commit comments

Comments
 (0)