Skip to content

Commit f1d1eeb

Browse files
committed
feat(content_management): add loading more indicators for countries and languages
- Add countriesIsLoadingMore and languagesIsLoadingMore fields to CreateSourceState - Update constructor, copyWith method, and properties list to include new loading indicators - This change supports infinite scrolling functionality for country and language lists
1 parent b639e2c commit f1d1eeb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/content_management/bloc/create_source/create_source_state.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ final class CreateSourceState extends Equatable {
3131
this.headquarters,
3232
this.countries = const [],
3333
this.countriesHasMore = true,
34+
this.countriesIsLoadingMore = false,
3435
this.countriesCursor,
3536
this.countrySearchTerm = '',
3637
this.languages = const [],
3738
this.languagesHasMore = true,
39+
this.languagesIsLoadingMore = false,
3840
this.languagesCursor,
3941
this.languageSearchTerm = '',
4042
this.contentStatus = ContentStatus.active,
@@ -51,10 +53,12 @@ final class CreateSourceState extends Equatable {
5153
final Country? headquarters;
5254
final List<Country> countries;
5355
final bool countriesHasMore;
56+
final bool countriesIsLoadingMore;
5457
final String? countriesCursor;
5558
final String countrySearchTerm;
5659
final List<Language> languages;
5760
final bool languagesHasMore;
61+
final bool languagesIsLoadingMore;
5862
final String? languagesCursor;
5963
final String languageSearchTerm;
6064
final ContentStatus contentStatus;
@@ -80,10 +84,12 @@ final class CreateSourceState extends Equatable {
8084
ValueGetter<Country?>? headquarters,
8185
List<Country>? countries,
8286
bool? countriesHasMore,
87+
bool? countriesIsLoadingMore,
8388
String? countriesCursor,
8489
String? countrySearchTerm,
8590
List<Language>? languages,
8691
bool? languagesHasMore,
92+
bool? languagesIsLoadingMore,
8793
String? languagesCursor,
8894
String? languageSearchTerm,
8995
ContentStatus? contentStatus,
@@ -100,10 +106,14 @@ final class CreateSourceState extends Equatable {
100106
headquarters: headquarters != null ? headquarters() : this.headquarters,
101107
countries: countries ?? this.countries,
102108
countriesHasMore: countriesHasMore ?? this.countriesHasMore,
109+
countriesIsLoadingMore:
110+
countriesIsLoadingMore ?? this.countriesIsLoadingMore,
103111
countriesCursor: countriesCursor ?? this.countriesCursor,
104112
countrySearchTerm: countrySearchTerm ?? this.countrySearchTerm,
105113
languages: languages ?? this.languages,
106114
languagesHasMore: languagesHasMore ?? this.languagesHasMore,
115+
languagesIsLoadingMore:
116+
languagesIsLoadingMore ?? this.languagesIsLoadingMore,
107117
languagesCursor: languagesCursor ?? this.languagesCursor,
108118
languageSearchTerm: languageSearchTerm ?? this.languageSearchTerm,
109119
contentStatus: contentStatus ?? this.contentStatus,
@@ -123,10 +133,12 @@ final class CreateSourceState extends Equatable {
123133
headquarters,
124134
countries,
125135
countriesHasMore,
136+
countriesIsLoadingMore,
126137
countriesCursor,
127138
countrySearchTerm,
128139
languages,
129140
languagesHasMore,
141+
languagesIsLoadingMore,
130142
languagesCursor,
131143
languageSearchTerm,
132144
contentStatus,

0 commit comments

Comments
 (0)