Skip to content

Commit 440d2f0

Browse files
committed
refactor(create_headline_state): remove excerpt field
This commit removes the `excerpt` field from `CreateHeadlineState` and updates the `isFormValid` getter, `copyWith` method, and `props` list. This change reflects the removal of the `excerpt` field from the `Headline` model in the core package.
1 parent 374cf49 commit 440d2f0

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/content_management/bloc/create_headline/create_headline_state.dart

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ final class CreateHeadlineState extends Equatable {
2323
const CreateHeadlineState({
2424
this.status = CreateHeadlineStatus.initial,
2525
this.title = '',
26-
this.excerpt = '',
2726
this.url = '',
2827
this.imageUrl = '',
2928
this.source,
@@ -36,7 +35,6 @@ final class CreateHeadlineState extends Equatable {
3635

3736
final CreateHeadlineStatus status;
3837
final String title;
39-
final String excerpt;
4038
final String url;
4139
final String imageUrl;
4240
final Source? source;
@@ -49,7 +47,6 @@ final class CreateHeadlineState extends Equatable {
4947
/// Returns true if the form is valid and can be submitted.
5048
bool get isFormValid =>
5149
title.isNotEmpty &&
52-
excerpt.isNotEmpty &&
5350
url.isNotEmpty &&
5451
imageUrl.isNotEmpty &&
5552
source != null &&
@@ -60,7 +57,6 @@ final class CreateHeadlineState extends Equatable {
6057
CreateHeadlineState copyWith({
6158
CreateHeadlineStatus? status,
6259
String? title,
63-
String? excerpt,
6460
String? url,
6561
String? imageUrl,
6662
ValueGetter<Source?>? source,
@@ -73,7 +69,6 @@ final class CreateHeadlineState extends Equatable {
7369
return CreateHeadlineState(
7470
status: status ?? this.status,
7571
title: title ?? this.title,
76-
excerpt: excerpt ?? this.excerpt,
7772
url: url ?? this.url,
7873
imageUrl: imageUrl ?? this.imageUrl,
7974
source: source != null ? source() : this.source,
@@ -89,7 +84,6 @@ final class CreateHeadlineState extends Equatable {
8984
List<Object?> get props => [
9085
status,
9186
title,
92-
excerpt,
9387
url,
9488
imageUrl,
9589
source,

0 commit comments

Comments
 (0)