Skip to content

Commit 6b81b6a

Browse files
committed
feat(content_management): sort countries list in ascending order
- Modify the readAll() method in the countries repository to include sorting by name in ascending order - Update made in the create_source_bloc.dart file
1 parent 9867853 commit 6b81b6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/content_management/bloc/create_source/create_source_bloc.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class CreateSourceBloc extends Bloc<CreateSourceEvent, CreateSourceState> {
3838
) async {
3939
emit(state.copyWith(status: CreateSourceStatus.loading));
4040
try {
41-
final countriesResponse = await _countriesRepository.readAll();
41+
final countriesResponse = await _countriesRepository.readAll(
42+
sort: [const SortOption('name', SortOrder.asc)],
43+
);
4244
final countries = countriesResponse.items;
4345

4446
emit(

0 commit comments

Comments
 (0)