Skip to content

Commit 4a57839

Browse files
committed
refactor(content_management): update headlines filter breaking news status
- Replace direct boolean values with BreakingNewsFilterStatus enum - Improve code readability and maintainability
1 parent 243c695 commit 4a57839

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/content_management/bloc/headlines_filter/headlines_filter_bloc.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:bloc/bloc.dart';
22
import 'package:core/core.dart';
33
import 'package:equatable/equatable.dart';
4+
import 'package:flutter_news_app_web_dashboard_full_source_code/content_management/models/breaking_news_filter_status.dart';
45

56
part 'headlines_filter_event.dart';
67
part 'headlines_filter_state.dart';
@@ -78,8 +79,8 @@ class HeadlinesFilterBloc
7879

7980
/// Handles changes to the breaking news filter.
8081
///
81-
/// This updates the `isBreaking` status for the filter, which can be
82-
/// `true` (breaking only), `false` (non-breaking only), or `null` (all).
82+
/// This updates the `isBreaking` status for the filter using the
83+
/// [BreakingNewsFilterStatus] enum.
8384
void _onHeadlinesBreakingNewsFilterChanged(
8485
HeadlinesBreakingNewsFilterChanged event,
8586
Emitter<HeadlinesFilterState> emit,

0 commit comments

Comments
 (0)