|
1 | 1 | part of 'account_bloc.dart';
|
2 | 2 |
|
3 |
| -/// {@template account_event} |
4 |
| -/// Base class for Account events. |
5 |
| -/// {@endtemplate} |
6 |
| -sealed class AccountEvent extends Equatable { |
7 |
| - /// {@macro account_event} |
| 3 | +abstract class AccountEvent extends Equatable { |
8 | 4 | const AccountEvent();
|
9 | 5 |
|
10 | 6 | @override
|
11 | 7 | List<Object?> get props => [];
|
12 | 8 | }
|
13 | 9 |
|
14 |
| -/// {@template _account_user_changed} |
15 |
| -/// Internal event triggered when the authenticated user changes. |
16 |
| -/// {@endtemplate} |
17 |
| -final class _AccountUserChanged extends AccountEvent { |
18 |
| - /// {@macro _account_user_changed} |
19 |
| - const _AccountUserChanged({required this.user}); |
20 |
| - |
21 |
| - /// The current authenticated user, or null if unauthenticated. |
| 10 | +class AccountUserChanged extends AccountEvent { // Corrected name |
| 11 | + const AccountUserChanged(this.user); |
22 | 12 | final User? user;
|
23 | 13 |
|
24 | 14 | @override
|
25 | 15 | List<Object?> get props => [user];
|
26 | 16 | }
|
27 | 17 |
|
28 |
| -/// {@template account_load_content_preferences_requested} |
29 |
| -/// Event triggered when the user's content preferences need to be loaded. |
30 |
| -/// {@endtemplate} |
31 |
| -final class AccountLoadContentPreferencesRequested extends AccountEvent { |
32 |
| - /// {@macro account_load_content_preferences_requested} |
33 |
| - const AccountLoadContentPreferencesRequested({required this.userId}); |
34 |
| - |
35 |
| - /// The ID of the user whose content preferences should be loaded. |
| 18 | +class AccountLoadUserPreferences extends AccountEvent { // Corrected name |
| 19 | + const AccountLoadUserPreferences({required this.userId}); |
36 | 20 | final String userId;
|
37 | 21 |
|
38 | 22 | @override
|
39 | 23 | List<Object> get props => [userId];
|
40 | 24 | }
|
41 | 25 |
|
42 |
| -/// {@template account_follow_category_toggled} |
43 |
| -/// Event triggered when a user toggles following a category. |
44 |
| -/// {@endtemplate} |
45 |
| -final class AccountFollowCategoryToggled extends AccountEvent { |
46 |
| - /// {@macro account_follow_category_toggled} |
47 |
| - const AccountFollowCategoryToggled({required this.category}); |
| 26 | +class AccountSaveHeadlineToggled extends AccountEvent { |
| 27 | + const AccountSaveHeadlineToggled({required this.headline}); |
| 28 | + final Headline headline; |
48 | 29 |
|
| 30 | + @override |
| 31 | + List<Object> get props => [headline]; |
| 32 | +} |
| 33 | + |
| 34 | +class AccountFollowCategoryToggled extends AccountEvent { |
| 35 | + const AccountFollowCategoryToggled({required this.category}); |
49 | 36 | final Category category;
|
50 | 37 |
|
51 | 38 | @override
|
52 | 39 | List<Object> get props => [category];
|
53 | 40 | }
|
54 | 41 |
|
55 |
| -/// {@template account_follow_source_toggled} |
56 |
| -/// Event triggered when a user toggles following a source. |
57 |
| -/// {@endtemplate} |
58 |
| -final class AccountFollowSourceToggled extends AccountEvent { |
59 |
| - /// {@macro account_follow_source_toggled} |
| 42 | +class AccountFollowSourceToggled extends AccountEvent { |
60 | 43 | const AccountFollowSourceToggled({required this.source});
|
61 |
| - |
62 | 44 | final Source source;
|
63 | 45 |
|
64 | 46 | @override
|
65 | 47 | List<Object> get props => [source];
|
66 | 48 | }
|
67 | 49 |
|
68 |
| -/// {@template account_follow_country_toggled} |
69 |
| -/// Event triggered when a user toggles following a country. |
70 |
| -/// {@endtemplate} |
71 |
| -final class AccountFollowCountryToggled extends AccountEvent { |
72 |
| - /// {@macro account_follow_country_toggled} |
73 |
| - const AccountFollowCountryToggled({required this.country}); |
| 50 | +// AccountFollowCountryToggled event correctly removed previously |
74 | 51 |
|
75 |
| - final Country country; |
76 |
| - |
77 |
| - @override |
78 |
| - List<Object> get props => [country]; |
79 |
| -} |
80 |
| - |
81 |
| -/// {@template account_save_headline_toggled} |
82 |
| -/// Event triggered when a user toggles saving a headline. |
83 |
| -/// {@endtemplate} |
84 |
| -final class AccountSaveHeadlineToggled extends AccountEvent { |
85 |
| - /// {@macro account_save_headline_toggled} |
86 |
| - const AccountSaveHeadlineToggled({required this.headline}); |
87 |
| - |
88 |
| - final Headline headline; |
| 52 | +class AccountClearUserPreferences extends AccountEvent { |
| 53 | + const AccountClearUserPreferences({required this.userId}); |
| 54 | + final String userId; |
89 | 55 |
|
90 | 56 | @override
|
91 |
| - List<Object> get props => [headline]; |
| 57 | + List<Object> get props => [userId]; |
92 | 58 | }
|
0 commit comments