Skip to content

Commit cd46a81

Browse files
committed
refactor(content_management): add createdHeadline to CreateHeadlineState
1 parent 229919a commit cd46a81

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/content_management/bloc/create_headline/create_headline_state.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ final class CreateHeadlineState extends Equatable {
3232
this.categories = const [],
3333
this.contentStatus = ContentStatus.active,
3434
this.errorMessage,
35+
this.createdHeadline,
3536
});
3637

3738
final CreateHeadlineStatus status;
@@ -45,6 +46,7 @@ final class CreateHeadlineState extends Equatable {
4546
final List<Category> categories;
4647
final ContentStatus contentStatus;
4748
final String? errorMessage;
49+
final Headline? createdHeadline;
4850

4951
/// Returns true if the form is valid and can be submitted.
5052
bool get isFormValid => title.isNotEmpty;
@@ -61,6 +63,7 @@ final class CreateHeadlineState extends Equatable {
6163
List<Category>? categories,
6264
ContentStatus? contentStatus,
6365
String? errorMessage,
66+
Headline? createdHeadline,
6467
}) {
6568
return CreateHeadlineState(
6669
status: status ?? this.status,
@@ -73,7 +76,8 @@ final class CreateHeadlineState extends Equatable {
7376
sources: sources ?? this.sources,
7477
categories: categories ?? this.categories,
7578
contentStatus: contentStatus ?? this.contentStatus,
76-
errorMessage: errorMessage ?? this.errorMessage,
79+
errorMessage: errorMessage,
80+
createdHeadline: createdHeadline ?? this.createdHeadline,
7781
);
7882
}
7983

@@ -90,5 +94,6 @@ final class CreateHeadlineState extends Equatable {
9094
categories,
9195
contentStatus,
9296
errorMessage,
97+
createdHeadline,
9398
];
9499
}

0 commit comments

Comments
 (0)