Skip to content

Commit ebb856c

Browse files
committed
refactor(create_headline_bloc): remove excerpt handling logic
This commit removes all logic related to the `excerpt` field from the `CreateHeadlineBloc`, including its event handler and its usage when constructing new `Headline` objects, to align with the updated `Headline` model in the core package.
1 parent 0f9aec4 commit ebb856c

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/content_management/bloc/create_headline/create_headline_bloc.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class CreateHeadlineBloc
1717
}) : _headlinesRepository = headlinesRepository,
1818
super(const CreateHeadlineState()) {
1919
on<CreateHeadlineTitleChanged>(_onTitleChanged);
20-
on<CreateHeadlineExcerptChanged>(_onExcerptChanged);
2120
on<CreateHeadlineUrlChanged>(_onUrlChanged);
2221
on<CreateHeadlineImageUrlChanged>(_onImageUrlChanged);
2322
on<CreateHeadlineSourceChanged>(_onSourceChanged);
@@ -39,13 +38,6 @@ class CreateHeadlineBloc
3938
emit(state.copyWith(title: event.title));
4039
}
4140

42-
void _onExcerptChanged(
43-
CreateHeadlineExcerptChanged event,
44-
Emitter<CreateHeadlineState> emit,
45-
) {
46-
emit(state.copyWith(excerpt: event.excerpt));
47-
}
48-
4941
void _onUrlChanged(
5042
CreateHeadlineUrlChanged event,
5143
Emitter<CreateHeadlineState> emit,
@@ -99,7 +91,6 @@ class CreateHeadlineBloc
9991
final newHeadline = Headline(
10092
id: _uuid.v4(),
10193
title: state.title,
102-
excerpt: state.excerpt,
10394
url: state.url,
10495
imageUrl: state.imageUrl,
10596
source: state.source!,
@@ -141,7 +132,6 @@ class CreateHeadlineBloc
141132
final newHeadline = Headline(
142133
id: _uuid.v4(),
143134
title: state.title,
144-
excerpt: state.excerpt,
145135
url: state.url,
146136
imageUrl: state.imageUrl,
147137
source: state.source!,

0 commit comments

Comments
 (0)