Skip to content

Commit a810921

Browse files
committed
feat(content_management): add loading more state for countries
- Add 'countriesIsLoadingMore' field to CreateHeadlineState - Update copyWith method to include new field - Modify state initialization to set default value for 'countriesIsLoadingMore'
1 parent 356f739 commit a810921

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/content_management/bloc/create_headline/create_headline_state.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ final class CreateHeadlineState extends Equatable {
3333
this.topics = const [],
3434
this.countries = const [],
3535
this.countriesHasMore = true,
36+
this.countriesIsLoadingMore = false,
3637
this.countriesCursor,
3738
this.countrySearchTerm = '',
3839
this.contentStatus = ContentStatus.active,
@@ -52,6 +53,7 @@ final class CreateHeadlineState extends Equatable {
5253
final List<Topic> topics;
5354
final List<Country> countries;
5455
final bool countriesHasMore;
56+
final bool countriesIsLoadingMore;
5557
final String? countriesCursor;
5658
final String countrySearchTerm;
5759
final ContentStatus contentStatus;
@@ -81,6 +83,7 @@ final class CreateHeadlineState extends Equatable {
8183
List<Topic>? topics,
8284
List<Country>? countries,
8385
bool? countriesHasMore,
86+
bool? countriesIsLoadingMore,
8487
String? countriesCursor,
8588
String? countrySearchTerm,
8689
ContentStatus? contentStatus,
@@ -100,6 +103,8 @@ final class CreateHeadlineState extends Equatable {
100103
topics: topics ?? this.topics,
101104
countries: countries ?? this.countries,
102105
countriesHasMore: countriesHasMore ?? this.countriesHasMore,
106+
countriesIsLoadingMore:
107+
countriesIsLoadingMore ?? this.countriesIsLoadingMore,
103108
countriesCursor: countriesCursor ?? this.countriesCursor,
104109
countrySearchTerm: countrySearchTerm ?? this.countrySearchTerm,
105110
contentStatus: contentStatus ?? this.contentStatus,
@@ -122,6 +127,7 @@ final class CreateHeadlineState extends Equatable {
122127
topics,
123128
countries,
124129
countriesHasMore,
130+
countriesIsLoadingMore,
125131
countriesCursor,
126132
countrySearchTerm,
127133
contentStatus,

0 commit comments

Comments
 (0)