From 0583406e3b28b3cf2046685a5f03f2763a2871f7 Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 7 Jul 2023 13:07:53 +0700 Subject: [PATCH] TF-1708 Update props properties for all state object in interactor (cherry picked from commit 2a5441c2ef4facf28e7e6e1678e89601d72259be) --- core/lib/presentation/state/failure.dart | 9 ++++- core/lib/presentation/state/success.dart | 6 +++- lib/features/base/state/ui_action_state.dart | 6 ++-- .../state/cleanup_email_cache_state.dart | 17 +++------ .../cleanup_recent_login_url_cache_state.dart | 17 +++------ ...nup_recent_login_username_cache_state.dart | 17 +++------ .../cleanup_recent_search_cache_state.dart | 17 +++------ .../state/download_image_as_base64_state.dart | 14 ++------ .../domain/state/get_autocomplete_state.dart | 9 ++--- .../get_device_contact_suggestions_state.dart | 12 +++---- .../state/save_email_address_state.dart | 17 +++------ .../state/save_email_as_drafts_state.dart | 19 +++------- .../domain/state/send_email_state.dart | 6 ---- .../state/update_email_drafts_state.dart | 19 +++------- .../domain/state/upload_attachment_state.dart | 5 ++- .../state/delete_email_permanently_state.dart | 21 +++-------- ...ete_multiple_emails_permanently_state.dart | 22 ++++-------- .../state/delete_sending_email_state.dart | 3 -- .../download_attachment_for_web_state.dart | 12 +++---- .../state/download_attachments_state.dart | 11 +++--- .../domain/state/export_attachment_state.dart | 10 +++--- .../state/get_detailed_email_by_id_state.dart | 3 -- .../domain/state/get_email_content_state.dart | 3 -- .../state/get_stored_state_email_state.dart | 14 ++------ .../state/mark_as_email_read_state.dart | 9 +++-- .../state/mark_as_email_star_state.dart | 9 +++-- .../domain/state/move_to_mailbox_state.dart | 11 +++--- .../state/send_receipt_to_sender_state.dart | 7 +--- .../domain/state/store_new_email_state.dart | 6 ++-- .../state/store_opened_email_state.dart | 3 -- .../state/store_sending_email_state.dart | 3 -- .../mark_as_email_read_interactor.dart | 4 +-- .../mark_as_star_email_interactor.dart | 4 +-- .../usecases/move_to_mailbox_interactor.dart | 4 +-- .../authenticate_oidc_on_browser_state.dart | 23 ++---------- .../state/authentication_user_state.dart | 15 +++----- .../state/check_oidc_is_available_state.dart | 11 +----- .../state/delete_authority_oidc_state.dart | 16 +++------ .../domain/state/delete_credential_state.dart | 16 +++------ ...get_all_recent_login_url_latest_state.dart | 6 +--- .../get_all_recent_login_username_state.dart | 6 +--- .../get_authenticated_account_state.dart | 12 ++----- .../state/get_authentication_info_state.dart | 20 ++--------- .../domain/state/get_credential_state.dart | 3 -- .../state/get_oidc_configuration_state.dart | 16 +++------ .../state/get_oidc_is_available_state.dart | 11 +----- .../get_stored_oidc_configuration_state.dart | 14 ++------ .../state/get_stored_token_oidc_state.dart | 9 +---- .../domain/state/get_token_oidc_state.dart | 17 +++------ .../state/refresh_token_oidc_state.dart | 11 +++--- .../state/save_recent_login_url_state.dart | 15 ++------ .../save_recent_login_username_state.dart | 15 ++------ .../update_authentication_account_state.dart | 14 ++------ .../state/create_new_mailbox_state.dart | 11 +++--- .../state/delete_multiple_mailbox_state.dart | 18 +++------- .../domain/state/get_all_mailboxes_state.dart | 6 +--- .../state/mark_as_mailbox_read_state.dart | 36 ++++++++----------- .../domain/state/move_mailbox_state.dart | 6 ++-- .../refresh_changes_all_mailboxes_state.dart | 9 ++--- .../domain/state/rename_mailbox_state.dart | 12 ++----- .../domain/state/search_mailbox_state.dart | 9 ++--- .../domain/state/subscribe_mailbox_state.dart | 11 +++--- .../subscribe_multiple_mailbox_state.dart | 18 +++------- .../domain/state/verify_name_view_state.dart | 16 +++------ ...st_time_dismissed_spam_reported_state.dart | 14 ++------ .../state/delete_spam_report_state.dart | 14 ++------ .../get_all_recent_search_latest_state.dart | 9 ++--- ...get_app_dashboard_configuration_state.dart | 6 +--- .../state/get_composer_cache_state.dart | 9 ++--- ...et_number_of_unread_spam_emails_state.dart | 6 +--- .../state/get_spam_mailbox_cached_state.dart | 3 -- .../domain/state/get_spam_report_state.dart | 6 +--- .../domain/state/get_user_profile_state.dart | 11 +++--- .../state/quick_search_email_state.dart | 10 ++---- .../state/remove_composer_cache_state.dart | 9 ++--- .../state/remove_email_drafts_state.dart | 11 ++---- .../state/save_composer_cache_state.dart | 17 +++------ .../state/save_recent_search_state.dart | 17 +++------ ...st_time_dismissed_spam_reported_state.dart | 14 ++------ .../domain/state/store_spam_report_state.dart | 8 ++--- .../add_recipient_in_forwarding_state.dart | 6 +--- .../create_new_default_identity_state.dart | 6 +--- .../state/create_new_identity_state.dart | 6 +--- .../state/create_new_rule_filter_state.dart | 6 +--- .../domain/state/delete_email_rule_state.dart | 6 +--- .../domain/state/delete_identity_state.dart | 6 +--- .../delete_recipient_in_forwarding_state.dart | 14 ++------ .../state/edit_default_identity_state.dart | 17 +++------ .../state/edit_email_rule_filter_state.dart | 6 +--- .../domain/state/edit_identity_state.dart | 17 +++------ .../edit_local_copy_in_forwarding_state.dart | 6 +--- .../state/get_all_identities_state.dart | 9 ++--- .../domain/state/get_all_rules_state.dart | 9 ++--- .../domain/state/get_all_vacation_state.dart | 14 ++------ .../domain/state/get_forward_state.dart | 9 ++--- .../domain/state/log_out_oidc_state.dart | 14 ++------ .../domain/state/save_language_state.dart | 18 +++------- .../state/transform_html_signature_state.dart | 11 +----- .../domain/state/update_vacation_state.dart | 14 ++------ .../delete_email_state_to_refresh_state.dart | 6 +--- ...delete_mailbox_state_to_refresh_state.dart | 6 +--- .../state/destroy_subscription_state.dart | 7 +--- ...il_changes_to_push_notification_state.dart | 3 -- ..._changes_to_remove_notification_state.dart | 3 -- .../get_email_state_to_refresh_state.dart | 6 +--- .../state/get_fcm_subscription_local.dart | 6 +--- .../get_firebase_subscription_state.dart | 6 +--- .../get_mailbox_state_to_refresh_state.dart | 6 +--- ...mailboxes_not_put_notifications_state.dart | 3 -- ...receive_email_from_notification_state.dart | 3 -- .../get_stored_email_delivery_state.dart | 6 +--- .../state/register_new_token_state.dart | 6 +--- .../state/store_email_delivery_state.dart | 14 ++------ .../store_email_state_to_refresh_state.dart | 14 ++------ .../store_mailbox_state_to_refresh_state.dart | 14 ++------ .../state/store_subscription_state.dart | 14 ++------ .../quotas/domain/state/get_quotas_state.dart | 6 +--- .../refresh_changes_search_email_state.dart | 14 ++------ .../delete_multiple_sending_email_state.dart | 3 -- .../state/delete_sending_email_state.dart | 4 +-- .../state/get_all_sending_email_state.dart | 3 -- .../state/get_stored_sending_email_state.dart | 3 -- .../state/store_sending_email_state.dart | 4 +-- .../update_multiple_sending_email_state.dart | 6 ---- .../state/update_sending_email_state.dart | 3 -- .../domain/state/get_session_state.dart | 6 ++-- .../state/get_stored_session_state.dart | 3 -- .../domain/state/store_session_state.dart | 3 -- .../state/empty_trash_folder_state.dart | 11 ++---- .../domain/state/get_all_email_state.dart | 11 +++--- .../domain/state/get_email_by_id_state.dart | 6 +--- .../domain/state/load_more_emails_state.dart | 11 +++--- .../mark_as_multiple_email_read_state.dart | 12 +++---- .../mark_as_star_multiple_email_state.dart | 14 ++++---- .../move_multiple_email_to_mailbox_state.dart | 14 ++++---- .../refresh_changes_all_email_state.dart | 11 +++--- .../domain/state/search_email_state.dart | 18 +++------- .../domain/state/search_more_email_state.dart | 19 +++------- ...ark_as_multiple_email_read_interactor.dart | 2 +- ...ark_as_star_multiple_email_interactor.dart | 2 +- ..._multiple_email_to_mailbox_interactor.dart | 2 +- .../domain/state/local_file_picker_state.dart | 17 +++------ 142 files changed, 348 insertions(+), 1092 deletions(-) diff --git a/core/lib/presentation/state/failure.dart b/core/lib/presentation/state/failure.dart index 02ea0bff3..9ea7d6a70 100644 --- a/core/lib/presentation/state/failure.dart +++ b/core/lib/presentation/state/failure.dart @@ -1,9 +1,16 @@ import 'package:equatable/equatable.dart'; -abstract class Failure extends Equatable {} +abstract class Failure with EquatableMixin { + + @override + bool? get stringify => true; +} abstract class FeatureFailure extends Failure { final dynamic exception; FeatureFailure({this.exception}); + + @override + List get props => [exception]; } diff --git a/core/lib/presentation/state/success.dart b/core/lib/presentation/state/success.dart index d6061aa83..a797a0dbf 100644 --- a/core/lib/presentation/state/success.dart +++ b/core/lib/presentation/state/success.dart @@ -1,6 +1,10 @@ import 'package:equatable/equatable.dart'; -abstract class Success with EquatableMixin {} +abstract class Success with EquatableMixin { + + @override + bool? get stringify => true; +} abstract class ViewState extends Success {} diff --git a/lib/features/base/state/ui_action_state.dart b/lib/features/base/state/ui_action_state.dart index d53d19d01..10cd8953d 100644 --- a/lib/features/base/state/ui_action_state.dart +++ b/lib/features/base/state/ui_action_state.dart @@ -2,10 +2,10 @@ import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; -class UIActionState extends UIState { +abstract class UIActionState extends UIState { - jmap.State? currentEmailState; - jmap.State? currentMailboxState; + final jmap.State? currentEmailState; + final jmap.State? currentMailboxState; UIActionState(this.currentEmailState, this.currentMailboxState); diff --git a/lib/features/cleanup/domain/state/cleanup_email_cache_state.dart b/lib/features/cleanup/domain/state/cleanup_email_cache_state.dart index 18c6ac56a..553719ac3 100644 --- a/lib/features/cleanup/domain/state/cleanup_email_cache_state.dart +++ b/lib/features/cleanup/domain/state/cleanup_email_cache_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class CleanupEmailCacheSuccess extends UIState { - - CleanupEmailCacheSuccess(); - - @override - List get props => []; -} +class CleanupEmailCacheSuccess extends UIState {} class CleanupEmailCacheFailure extends FeatureFailure { - final dynamic exception; - CleanupEmailCacheFailure(this.exception); - - @override - List get props => [exception]; + CleanupEmailCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/cleanup/domain/state/cleanup_recent_login_url_cache_state.dart b/lib/features/cleanup/domain/state/cleanup_recent_login_url_cache_state.dart index 6a59df7ce..434fe08c6 100644 --- a/lib/features/cleanup/domain/state/cleanup_recent_login_url_cache_state.dart +++ b/lib/features/cleanup/domain/state/cleanup_recent_login_url_cache_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class CleanupRecentLoginUrlCacheSuccess extends UIState { - - CleanupRecentLoginUrlCacheSuccess(); - - @override - List get props => []; -} +class CleanupRecentLoginUrlCacheSuccess extends UIState {} class CleanupRecentLoginUrlCacheFailure extends FeatureFailure { - final dynamic exception; - CleanupRecentLoginUrlCacheFailure(this.exception); - - @override - List get props => [exception]; + CleanupRecentLoginUrlCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/cleanup/domain/state/cleanup_recent_login_username_cache_state.dart b/lib/features/cleanup/domain/state/cleanup_recent_login_username_cache_state.dart index d426c9a69..32d2bdd7c 100644 --- a/lib/features/cleanup/domain/state/cleanup_recent_login_username_cache_state.dart +++ b/lib/features/cleanup/domain/state/cleanup_recent_login_username_cache_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class CleanupRecentLoginUsernameCacheSuccess extends UIState { - - CleanupRecentLoginUsernameCacheSuccess(); - - @override - List get props => []; -} +class CleanupRecentLoginUsernameCacheSuccess extends UIState {} class CleanupRecentLoginUsernameCacheFailure extends FeatureFailure { - final dynamic exception; - CleanupRecentLoginUsernameCacheFailure(this.exception); - - @override - List get props => [exception]; + CleanupRecentLoginUsernameCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/cleanup/domain/state/cleanup_recent_search_cache_state.dart b/lib/features/cleanup/domain/state/cleanup_recent_search_cache_state.dart index 3a913a045..19ee7a266 100644 --- a/lib/features/cleanup/domain/state/cleanup_recent_search_cache_state.dart +++ b/lib/features/cleanup/domain/state/cleanup_recent_search_cache_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class CleanupRecentSearchCacheSuccess extends UIState { - - CleanupRecentSearchCacheSuccess(); - - @override - List get props => []; -} +class CleanupRecentSearchCacheSuccess extends UIState {} class CleanupRecentSearchCacheFailure extends FeatureFailure { - final dynamic exception; - CleanupRecentSearchCacheFailure(this.exception); - - @override - List get props => [exception]; + CleanupRecentSearchCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/download_image_as_base64_state.dart b/lib/features/composer/domain/state/download_image_as_base64_state.dart index 0b783e198..25997c285 100644 --- a/lib/features/composer/domain/state/download_image_as_base64_state.dart +++ b/lib/features/composer/domain/state/download_image_as_base64_state.dart @@ -3,13 +3,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/upload/file_info.dart'; -class DownloadingImageAsBase64 extends UIState { - - DownloadingImageAsBase64(); - - @override - List get props => []; -} +class DownloadingImageAsBase64 extends UIState {} class DownloadImageAsBase64Success extends UIState { @@ -24,10 +18,6 @@ class DownloadImageAsBase64Success extends UIState { } class DownloadImageAsBase64Failure extends FeatureFailure { - final dynamic exception; - DownloadImageAsBase64Failure(this.exception); - - @override - List get props => [exception]; + DownloadImageAsBase64Failure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/get_autocomplete_state.dart b/lib/features/composer/domain/state/get_autocomplete_state.dart index 48888fbc6..6a3535fad 100644 --- a/lib/features/composer/domain/state/get_autocomplete_state.dart +++ b/lib/features/composer/domain/state/get_autocomplete_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/email/email_address.dart'; class GetAutoCompleteSuccess extends UIState { @@ -12,10 +13,6 @@ class GetAutoCompleteSuccess extends UIState { } class GetAutoCompleteFailure extends FeatureFailure { - final dynamic exception; - GetAutoCompleteFailure(this.exception); - - @override - List get props => [exception]; + GetAutoCompleteFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/get_device_contact_suggestions_state.dart b/lib/features/composer/domain/state/get_device_contact_suggestions_state.dart index 91174591b..cbda3c4f6 100644 --- a/lib/features/composer/domain/state/get_device_contact_suggestions_state.dart +++ b/lib/features/composer/domain/state/get_device_contact_suggestions_state.dart @@ -1,6 +1,6 @@ - -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/contact/contact.dart'; class GetDeviceContactSuggestionsSuccess extends UIState { final List results; @@ -12,10 +12,6 @@ class GetDeviceContactSuggestionsSuccess extends UIState { } class GetDeviceContactSuggestionsFailure extends FeatureFailure { - final dynamic exception; - GetDeviceContactSuggestionsFailure(this.exception); - - @override - List get props => [exception]; + GetDeviceContactSuggestionsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/save_email_address_state.dart b/lib/features/composer/domain/state/save_email_address_state.dart index a42c67757..1695991f6 100644 --- a/lib/features/composer/domain/state/save_email_address_state.dart +++ b/lib/features/composer/domain/state/save_email_address_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class SaveEmailAddressSuccess extends UIState { - - SaveEmailAddressSuccess(); - - @override - List get props => []; -} +class SaveEmailAddressSuccess extends UIState {} class SaveEmailAddressFailure extends FeatureFailure { - final dynamic exception; - SaveEmailAddressFailure(this.exception); - - @override - List get props => [exception]; + SaveEmailAddressFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/save_email_as_drafts_state.dart b/lib/features/composer/domain/state/save_email_as_drafts_state.dart index 3c12d0ea8..e92f9d719 100644 --- a/lib/features/composer/domain/state/save_email_as_drafts_state.dart +++ b/lib/features/composer/domain/state/save_email_as_drafts_state.dart @@ -1,15 +1,10 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; -class SaveEmailAsDraftsLoading extends UIState { - - SaveEmailAsDraftsLoading(); - - @override - List get props => []; -} +class SaveEmailAsDraftsLoading extends UIState {} class SaveEmailAsDraftsSuccess extends UIActionState { @@ -24,14 +19,10 @@ class SaveEmailAsDraftsSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => []; + List get props => [emailAsDrafts, ...super.props]; } class SaveEmailAsDraftsFailure extends FeatureFailure { - final dynamic exception; - SaveEmailAsDraftsFailure(this.exception); - - @override - List get props => [exception]; + SaveEmailAsDraftsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/send_email_state.dart b/lib/features/composer/domain/state/send_email_state.dart index c81db9451..6a4263b33 100644 --- a/lib/features/composer/domain/state/send_email_state.dart +++ b/lib/features/composer/domain/state/send_email_state.dart @@ -11,15 +11,9 @@ class SendEmailSuccess extends UIActionState { jmap.State? currentEmailState, jmap.State? currentMailboxState, }) : super(currentEmailState, currentMailboxState); - - @override - List get props => []; } class SendEmailFailure extends FeatureFailure { SendEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/composer/domain/state/update_email_drafts_state.dart b/lib/features/composer/domain/state/update_email_drafts_state.dart index 22ac59f8d..af7ae6877 100644 --- a/lib/features/composer/domain/state/update_email_drafts_state.dart +++ b/lib/features/composer/domain/state/update_email_drafts_state.dart @@ -1,15 +1,10 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; -class UpdatingEmailDrafts extends UIState { - - UpdatingEmailDrafts(); - - @override - List get props => []; -} +class UpdatingEmailDrafts extends UIState {} class UpdateEmailDraftsSuccess extends UIActionState { @@ -24,14 +19,10 @@ class UpdateEmailDraftsSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => []; + List get props => [emailAsDrafts, ...super.props]; } class UpdateEmailDraftsFailure extends FeatureFailure { - final dynamic exception; - UpdateEmailDraftsFailure(this.exception); - - @override - List get props => [exception]; + UpdateEmailDraftsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/composer/domain/state/upload_attachment_state.dart b/lib/features/composer/domain/state/upload_attachment_state.dart index 87c169d05..3c67a365b 100644 --- a/lib/features/composer/domain/state/upload_attachment_state.dart +++ b/lib/features/composer/domain/state/upload_attachment_state.dart @@ -15,11 +15,10 @@ class UploadAttachmentSuccess extends UIState { } class UploadAttachmentFailure extends FeatureFailure { - final dynamic exception; final bool isInline; - UploadAttachmentFailure(this.exception, {this.isInline = false}); + UploadAttachmentFailure(dynamic exception, {this.isInline = false}) : super(exception: exception); @override - List get props => [exception, isInline]; + List get props => [isInline, ...super.props]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/delete_email_permanently_state.dart b/lib/features/email/domain/state/delete_email_permanently_state.dart index de50c93d2..9cd56e1e6 100644 --- a/lib/features/email/domain/state/delete_email_permanently_state.dart +++ b/lib/features/email/domain/state/delete_email_permanently_state.dart @@ -1,14 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; -class StartDeleteEmailPermanently extends UIState { - - StartDeleteEmailPermanently(); - - @override - List get props => []; -} +class StartDeleteEmailPermanently extends UIState {} class DeleteEmailPermanentlySuccess extends UIActionState { @@ -16,17 +11,9 @@ class DeleteEmailPermanentlySuccess extends UIActionState { jmap.State? currentEmailState, jmap.State? currentMailboxState, }) : super(currentEmailState, currentMailboxState); - - @override - List get props => []; } class DeleteEmailPermanentlyFailure extends FeatureFailure { - final dynamic exception; - - DeleteEmailPermanentlyFailure(this.exception); - - @override - List get props => [exception]; + DeleteEmailPermanentlyFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/delete_multiple_emails_permanently_state.dart b/lib/features/email/domain/state/delete_multiple_emails_permanently_state.dart index 9b1c014ad..33b9b8467 100644 --- a/lib/features/email/domain/state/delete_multiple_emails_permanently_state.dart +++ b/lib/features/email/domain/state/delete_multiple_emails_permanently_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; @@ -18,7 +19,7 @@ class DeleteMultipleEmailsPermanentlyAllSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [emailIds]; + List get props => [emailIds, ...super.props]; } class DeleteMultipleEmailsPermanentlyHasSomeEmailFailure extends UIActionState { @@ -34,23 +35,12 @@ class DeleteMultipleEmailsPermanentlyHasSomeEmailFailure extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [emailIds]; + List get props => [emailIds, ...super.props]; } -class DeleteMultipleEmailsPermanentlyAllFailure extends FeatureFailure { - - DeleteMultipleEmailsPermanentlyAllFailure(); - - @override - List get props => []; -} +class DeleteMultipleEmailsPermanentlyAllFailure extends FeatureFailure {} class DeleteMultipleEmailsPermanentlyFailure extends FeatureFailure { - final dynamic exception; - - DeleteMultipleEmailsPermanentlyFailure(this.exception); - - @override - List get props => [exception]; + DeleteMultipleEmailsPermanentlyFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/delete_sending_email_state.dart b/lib/features/email/domain/state/delete_sending_email_state.dart index bffb50b8d..4ba12eaa7 100644 --- a/lib/features/email/domain/state/delete_sending_email_state.dart +++ b/lib/features/email/domain/state/delete_sending_email_state.dart @@ -7,7 +7,4 @@ class DeleteSendingEmailSuccess extends UIState {} class DeleteSendingEmailFailure extends FeatureFailure { DeleteSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/download_attachment_for_web_state.dart b/lib/features/email/domain/state/download_attachment_for_web_state.dart index 8f1eec15d..f6822d887 100644 --- a/lib/features/email/domain/state/download_attachment_for_web_state.dart +++ b/lib/features/email/domain/state/download_attachment_for_web_state.dart @@ -1,7 +1,8 @@ import 'dart:typed_data'; - -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/download/download_task_id.dart'; +import 'package:model/email/attachment.dart'; class StartDownloadAttachmentForWeb extends UIState { @@ -55,10 +56,9 @@ class DownloadAttachmentForWebSuccess extends UIState { class DownloadAttachmentForWebFailure extends FeatureFailure { final DownloadTaskId taskId; - final dynamic exception; - DownloadAttachmentForWebFailure(this.taskId, this.exception); + DownloadAttachmentForWebFailure(this.taskId, dynamic exception) : super(exception: exception); @override - List get props => [taskId, exception]; + List get props => [taskId, ...super.props]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/download_attachments_state.dart b/lib/features/email/domain/state/download_attachments_state.dart index f60923963..42f2e6a99 100644 --- a/lib/features/email/domain/state/download_attachments_state.dart +++ b/lib/features/email/domain/state/download_attachments_state.dart @@ -1,5 +1,6 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/download/download_task_id.dart'; class DownloadAttachmentsSuccess extends UIState { final List taskIds; @@ -11,10 +12,6 @@ class DownloadAttachmentsSuccess extends UIState { } class DownloadAttachmentsFailure extends FeatureFailure { - final dynamic exception; - DownloadAttachmentsFailure(this.exception); - - @override - List get props => [exception]; + DownloadAttachmentsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/export_attachment_state.dart b/lib/features/email/domain/state/export_attachment_state.dart index 7d5dc7e5b..75ee96217 100644 --- a/lib/features/email/domain/state/export_attachment_state.dart +++ b/lib/features/email/domain/state/export_attachment_state.dart @@ -1,4 +1,6 @@ -import 'package:core/core.dart'; +import 'package:core/data/network/download/downloaded_response.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; class ExportAttachmentSuccess extends UIState { final DownloadedResponse downloadedResponse; @@ -10,10 +12,6 @@ class ExportAttachmentSuccess extends UIState { } class ExportAttachmentFailure extends FeatureFailure { - final dynamic exception; - ExportAttachmentFailure(this.exception); - - @override - List get props => [exception]; + ExportAttachmentFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/get_detailed_email_by_id_state.dart b/lib/features/email/domain/state/get_detailed_email_by_id_state.dart index 6e1e040cd..feaa71aec 100644 --- a/lib/features/email/domain/state/get_detailed_email_by_id_state.dart +++ b/lib/features/email/domain/state/get_detailed_email_by_id_state.dart @@ -22,7 +22,4 @@ class GetDetailedEmailByIdSuccess extends UIState { class GetDetailedEmailByIdFailure extends FeatureFailure { GetDetailedEmailByIdFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/get_email_content_state.dart b/lib/features/email/domain/state/get_email_content_state.dart index 2314bd0ae..8581209dc 100644 --- a/lib/features/email/domain/state/get_email_content_state.dart +++ b/lib/features/email/domain/state/get_email_content_state.dart @@ -49,7 +49,4 @@ class GetEmailContentFromCacheSuccess extends UIState { class GetEmailContentFailure extends FeatureFailure { GetEmailContentFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/get_stored_state_email_state.dart b/lib/features/email/domain/state/get_stored_state_email_state.dart index 5ddf82cd6..ad5b374b5 100644 --- a/lib/features/email/domain/state/get_stored_state_email_state.dart +++ b/lib/features/email/domain/state/get_stored_state_email_state.dart @@ -13,19 +13,9 @@ class GetStoredEmailStateSuccess extends UIState { List get props => [state]; } -class NotFoundEmailState extends FeatureFailure { - - NotFoundEmailState(); - - @override - List get props => []; -} +class NotFoundEmailState extends FeatureFailure {} class GetStoredEmailStateFailure extends FeatureFailure { - final dynamic exception; - GetStoredEmailStateFailure(this.exception); - - @override - List get props => [exception]; + GetStoredEmailStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/mark_as_email_read_state.dart b/lib/features/email/domain/state/mark_as_email_read_state.dart index de4a8644d..d7cd51186 100644 --- a/lib/features/email/domain/state/mark_as_email_read_state.dart +++ b/lib/features/email/domain/state/mark_as_email_read_state.dart @@ -1,4 +1,4 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:model/email/read_actions.dart'; @@ -19,15 +19,14 @@ class MarkAsEmailReadSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [updatedEmail, readActions]; + List get props => [updatedEmail, readActions, ...super.props]; } class MarkAsEmailReadFailure extends FeatureFailure { - final dynamic exception; final ReadActions readActions; - MarkAsEmailReadFailure(this.exception, this.readActions); + MarkAsEmailReadFailure(this.readActions, {dynamic exception}) : super(exception: exception); @override - List get props => [exception, readActions]; + List get props => [readActions, ...super.props]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/mark_as_email_star_state.dart b/lib/features/email/domain/state/mark_as_email_star_state.dart index d9619f125..dbe215734 100644 --- a/lib/features/email/domain/state/mark_as_email_star_state.dart +++ b/lib/features/email/domain/state/mark_as_email_star_state.dart @@ -1,4 +1,4 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:model/model.dart'; @@ -18,15 +18,14 @@ class MarkAsStarEmailSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [updatedEmail, markStarAction]; + List get props => [updatedEmail, markStarAction, ...super.props]; } class MarkAsStarEmailFailure extends FeatureFailure { - final dynamic exception; final MarkStarAction markStarAction; - MarkAsStarEmailFailure(this.exception, this.markStarAction); + MarkAsStarEmailFailure(this.markStarAction, {dynamic exception}) : super(exception: exception); @override - List get props => [exception, markStarAction]; + List get props => [markStarAction, ...super.props]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/move_to_mailbox_state.dart b/lib/features/email/domain/state/move_to_mailbox_state.dart index b2509ee4f..66e1359d4 100644 --- a/lib/features/email/domain/state/move_to_mailbox_state.dart +++ b/lib/features/email/domain/state/move_to_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; @@ -36,16 +37,16 @@ class MoveToMailboxSuccess extends UIActionState { destinationMailboxId, moveAction, emailActionType, - destinationPath + destinationPath, + ...super.props ]; } class MoveToMailboxFailure extends FeatureFailure { final EmailActionType emailActionType; - final dynamic exception; - MoveToMailboxFailure(this.emailActionType, this.exception); + MoveToMailboxFailure(this.emailActionType, {dynamic exception}) : super(exception: exception); @override - List get props => [emailActionType, exception]; + List get props => [emailActionType, ...super.props]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/send_receipt_to_sender_state.dart b/lib/features/email/domain/state/send_receipt_to_sender_state.dart index 08cb4ad83..fd29e08af 100644 --- a/lib/features/email/domain/state/send_receipt_to_sender_state.dart +++ b/lib/features/email/domain/state/send_receipt_to_sender_state.dart @@ -16,10 +16,5 @@ class SendReceiptToSenderSuccess extends UIState { class SendReceiptToSenderFailure extends FeatureFailure { - final dynamic exception; - - SendReceiptToSenderFailure(this.exception); - - @override - List get props => [exception]; + SendReceiptToSenderFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/email/domain/state/store_new_email_state.dart b/lib/features/email/domain/state/store_new_email_state.dart index d50df1b4a..e0acc2f8b 100644 --- a/lib/features/email/domain/state/store_new_email_state.dart +++ b/lib/features/email/domain/state/store_new_email_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; class StoreNewEmailLoading extends UIState {} @@ -7,7 +8,4 @@ class StoreNewEmailSuccess extends UIState {} class StoreNewEmailFailure extends FeatureFailure { StoreNewEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/store_opened_email_state.dart b/lib/features/email/domain/state/store_opened_email_state.dart index fc42b34e4..c479ed2d3 100644 --- a/lib/features/email/domain/state/store_opened_email_state.dart +++ b/lib/features/email/domain/state/store_opened_email_state.dart @@ -8,7 +8,4 @@ class StoreOpenedEmailSuccess extends UIState {} class StoreOpenedEmailFailure extends FeatureFailure { StoreOpenedEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/state/store_sending_email_state.dart b/lib/features/email/domain/state/store_sending_email_state.dart index 281bd5987..a3fb26278 100644 --- a/lib/features/email/domain/state/store_sending_email_state.dart +++ b/lib/features/email/domain/state/store_sending_email_state.dart @@ -17,7 +17,4 @@ class StoreSendingEmailSuccess extends UIState { class StoreSendingEmailFailure extends FeatureFailure { StoreSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/email/domain/usecases/mark_as_email_read_interactor.dart b/lib/features/email/domain/usecases/mark_as_email_read_interactor.dart index fc002ffab..4305181fb 100644 --- a/lib/features/email/domain/usecases/mark_as_email_read_interactor.dart +++ b/lib/features/email/domain/usecases/mark_as_email_read_interactor.dart @@ -33,10 +33,10 @@ class MarkAsEmailReadInteractor { currentEmailState: currentEmailState, currentMailboxState: currentMailboxState)); } else { - yield Left(MarkAsEmailReadFailure(null, readAction)); + yield Left(MarkAsEmailReadFailure(readAction)); } } catch (e) { - yield Left(MarkAsEmailReadFailure(e, readAction)); + yield Left(MarkAsEmailReadFailure(readAction, exception: e)); } } } \ No newline at end of file diff --git a/lib/features/email/domain/usecases/mark_as_star_email_interactor.dart b/lib/features/email/domain/usecases/mark_as_star_email_interactor.dart index a4f390dea..df89ea182 100644 --- a/lib/features/email/domain/usecases/mark_as_star_email_interactor.dart +++ b/lib/features/email/domain/usecases/mark_as_star_email_interactor.dart @@ -23,10 +23,10 @@ class MarkAsStarEmailInteractor { markStarAction, currentEmailState: currentEmailState)); } else { - yield Left(MarkAsStarEmailFailure(null, markStarAction)); + yield Left(MarkAsStarEmailFailure(markStarAction)); } } catch (e) { - yield Left(MarkAsStarEmailFailure(e, markStarAction)); + yield Left(MarkAsStarEmailFailure(markStarAction, exception: e)); } } } \ No newline at end of file diff --git a/lib/features/email/domain/usecases/move_to_mailbox_interactor.dart b/lib/features/email/domain/usecases/move_to_mailbox_interactor.dart index a162a5283..6c073dd74 100644 --- a/lib/features/email/domain/usecases/move_to_mailbox_interactor.dart +++ b/lib/features/email/domain/usecases/move_to_mailbox_interactor.dart @@ -37,10 +37,10 @@ class MoveToMailboxInteractor { currentMailboxState: currentMailboxState, currentEmailState: currentEmailState)); } else { - yield Left(MoveToMailboxFailure(moveRequest.emailActionType, null)); + yield Left(MoveToMailboxFailure(moveRequest.emailActionType)); } } catch (e) { - yield Left(MoveToMailboxFailure(moveRequest.emailActionType, e)); + yield Left(MoveToMailboxFailure(moveRequest.emailActionType, exception: e)); } } } \ No newline at end of file diff --git a/lib/features/login/domain/state/authenticate_oidc_on_browser_state.dart b/lib/features/login/domain/state/authenticate_oidc_on_browser_state.dart index d24b3ae9d..d3fdd58c2 100644 --- a/lib/features/login/domain/state/authenticate_oidc_on_browser_state.dart +++ b/lib/features/login/domain/state/authenticate_oidc_on_browser_state.dart @@ -1,28 +1,11 @@ - import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class AuthenticateOidcOnBrowserLoading extends LoadingState { +class AuthenticateOidcOnBrowserLoading extends LoadingState {} - AuthenticateOidcOnBrowserLoading(); - - @override - List get props => []; -} - -class AuthenticateOidcOnBrowserSuccess extends UIState { - - AuthenticateOidcOnBrowserSuccess(); - - @override - List get props => []; -} +class AuthenticateOidcOnBrowserSuccess extends UIState {} class AuthenticateOidcOnBrowserFailure extends FeatureFailure { - final dynamic exception; - AuthenticateOidcOnBrowserFailure(this.exception); - - @override - List get props => [exception]; + AuthenticateOidcOnBrowserFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/authentication_user_state.dart b/lib/features/login/domain/state/authentication_user_state.dart index 36c739a35..bf9fc8365 100644 --- a/lib/features/login/domain/state/authentication_user_state.dart +++ b/lib/features/login/domain/state/authentication_user_state.dart @@ -1,12 +1,8 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/user/user_profile.dart'; -class AuthenticationUserLoading extends LoadingState { - AuthenticationUserLoading(); - - @override - List get props => []; -} +class AuthenticationUserLoading extends LoadingState {} class AuthenticationUserSuccess extends UIState { final UserProfile userProfile; @@ -20,7 +16,4 @@ class AuthenticationUserSuccess extends UIState { class AuthenticationUserFailure extends FeatureFailure { AuthenticationUserFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/check_oidc_is_available_state.dart b/lib/features/login/domain/state/check_oidc_is_available_state.dart index a2e6bb419..f826c3e8f 100644 --- a/lib/features/login/domain/state/check_oidc_is_available_state.dart +++ b/lib/features/login/domain/state/check_oidc_is_available_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/oidc/response/oidc_response.dart'; -class CheckOIDCIsAvailableLoading extends LoadingState { - - CheckOIDCIsAvailableLoading(); - - @override - List get props => []; -} +class CheckOIDCIsAvailableLoading extends LoadingState {} class CheckOIDCIsAvailableSuccess extends UIState { final OIDCResponse oidcResponse; @@ -22,7 +16,4 @@ class CheckOIDCIsAvailableSuccess extends UIState { class CheckOIDCIsAvailableFailure extends FeatureFailure { CheckOIDCIsAvailableFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/delete_authority_oidc_state.dart b/lib/features/login/domain/state/delete_authority_oidc_state.dart index d75230cd4..0956c0f49 100644 --- a/lib/features/login/domain/state/delete_authority_oidc_state.dart +++ b/lib/features/login/domain/state/delete_authority_oidc_state.dart @@ -1,17 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class DeleteAuthorityOidcSuccess extends UIState { - DeleteAuthorityOidcSuccess(); - - @override - List get props => []; -} +class DeleteAuthorityOidcSuccess extends UIState {} class DeleteAuthorityOidcFailure extends FeatureFailure { - final dynamic exception; - DeleteAuthorityOidcFailure(this.exception); - - @override - List get props => [exception]; + DeleteAuthorityOidcFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/delete_credential_state.dart b/lib/features/login/domain/state/delete_credential_state.dart index 8388cacd4..f7b15817b 100644 --- a/lib/features/login/domain/state/delete_credential_state.dart +++ b/lib/features/login/domain/state/delete_credential_state.dart @@ -1,17 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class DeleteCredentialSuccess extends UIState { - DeleteCredentialSuccess(); - - @override - List get props => []; -} +class DeleteCredentialSuccess extends UIState {} class DeleteCredentialFailure extends FeatureFailure { - final dynamic exception; - DeleteCredentialFailure(this.exception); - - @override - List get props => [exception]; + DeleteCredentialFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_all_recent_login_url_latest_state.dart b/lib/features/login/domain/state/get_all_recent_login_url_latest_state.dart index f19b07be0..e9c4c372b 100644 --- a/lib/features/login/domain/state/get_all_recent_login_url_latest_state.dart +++ b/lib/features/login/domain/state/get_all_recent_login_url_latest_state.dart @@ -13,10 +13,6 @@ class GetAllRecentLoginUrlLatestSuccess extends UIState { } class GetAllRecentLoginUrlLatestFailure extends FeatureFailure { - final dynamic exception; - GetAllRecentLoginUrlLatestFailure(this.exception); - - @override - List get props => [exception]; + GetAllRecentLoginUrlLatestFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_all_recent_login_username_state.dart b/lib/features/login/domain/state/get_all_recent_login_username_state.dart index 4dea8a2d0..9e07ff2be 100644 --- a/lib/features/login/domain/state/get_all_recent_login_username_state.dart +++ b/lib/features/login/domain/state/get_all_recent_login_username_state.dart @@ -13,10 +13,6 @@ class GetAllRecentLoginUsernameLatestSuccess extends UIState { } class GetAllRecentLoginUsernameLatestFailure extends FeatureFailure { - final dynamic exception; - GetAllRecentLoginUsernameLatestFailure(this.exception); - - @override - List get props => [exception]; + GetAllRecentLoginUsernameLatestFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_authenticated_account_state.dart b/lib/features/login/domain/state/get_authenticated_account_state.dart index 639cbd5c5..9dc55aab3 100644 --- a/lib/features/login/domain/state/get_authenticated_account_state.dart +++ b/lib/features/login/domain/state/get_authenticated_account_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/account/personal_account.dart'; -class NoAuthenticatedAccountFailure extends FeatureFailure { - - NoAuthenticatedAccountFailure(); - - @override - List get props => []; -} +class NoAuthenticatedAccountFailure extends FeatureFailure {} class GetAuthenticatedAccountSuccess extends UIState { final PersonalAccount account; @@ -20,8 +14,6 @@ class GetAuthenticatedAccountSuccess extends UIState { } class GetAuthenticatedAccountFailure extends FeatureFailure { - GetAuthenticatedAccountFailure(dynamic exception) : super(exception: exception); - @override - List get props => [exception]; + GetAuthenticatedAccountFailure(dynamic exception) : super(exception: exception); } diff --git a/lib/features/login/domain/state/get_authentication_info_state.dart b/lib/features/login/domain/state/get_authentication_info_state.dart index 880614df3..a9310c3ff 100644 --- a/lib/features/login/domain/state/get_authentication_info_state.dart +++ b/lib/features/login/domain/state/get_authentication_info_state.dart @@ -1,27 +1,11 @@ - import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class GetAuthenticationInfoLoading extends LoadingState { +class GetAuthenticationInfoLoading extends LoadingState {} - GetAuthenticationInfoLoading(); - - @override - List get props => []; -} - -class GetAuthenticationInfoSuccess extends UIState { - - GetAuthenticationInfoSuccess(); - - @override - List get props => []; -} +class GetAuthenticationInfoSuccess extends UIState {} class GetAuthenticationInfoFailure extends FeatureFailure { GetAuthenticationInfoFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_credential_state.dart b/lib/features/login/domain/state/get_credential_state.dart index acc4dd92f..49c4ab7e2 100644 --- a/lib/features/login/domain/state/get_credential_state.dart +++ b/lib/features/login/domain/state/get_credential_state.dart @@ -17,7 +17,4 @@ class GetCredentialViewState extends UIState { class GetCredentialFailure extends FeatureFailure { GetCredentialFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_oidc_configuration_state.dart b/lib/features/login/domain/state/get_oidc_configuration_state.dart index 9ce7f5bba..af9f16b98 100644 --- a/lib/features/login/domain/state/get_oidc_configuration_state.dart +++ b/lib/features/login/domain/state/get_oidc_configuration_state.dart @@ -1,13 +1,8 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/oidc/oidc_configuration.dart'; -class GetOIDCConfigurationLoading extends LoadingState { - - GetOIDCConfigurationLoading(); - - @override - List get props => []; -} +class GetOIDCConfigurationLoading extends LoadingState {} class GetOIDCConfigurationSuccess extends UIState { @@ -22,7 +17,4 @@ class GetOIDCConfigurationSuccess extends UIState { class GetOIDCConfigurationFailure extends FeatureFailure { GetOIDCConfigurationFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_oidc_is_available_state.dart b/lib/features/login/domain/state/get_oidc_is_available_state.dart index 67136cd7c..16ac225cf 100644 --- a/lib/features/login/domain/state/get_oidc_is_available_state.dart +++ b/lib/features/login/domain/state/get_oidc_is_available_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/oidc/response/oidc_response.dart'; -class GetOIDCIsAvailableLoading extends LoadingState { - - GetOIDCIsAvailableLoading(); - - @override - List get props => []; -} +class GetOIDCIsAvailableLoading extends LoadingState {} class GetOIDCIsAvailableSuccess extends UIState { final OIDCResponse oidcResponse; @@ -22,7 +16,4 @@ class GetOIDCIsAvailableSuccess extends UIState { class GetOIDCIsAvailableFailure extends FeatureFailure { GetOIDCIsAvailableFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_stored_oidc_configuration_state.dart b/lib/features/login/domain/state/get_stored_oidc_configuration_state.dart index f35ae2402..9f739fdac 100644 --- a/lib/features/login/domain/state/get_stored_oidc_configuration_state.dart +++ b/lib/features/login/domain/state/get_stored_oidc_configuration_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/oidc/oidc_configuration.dart'; -class GetStoredOidcConfigurationLoading extends LoadingState { - - GetStoredOidcConfigurationLoading(); - - @override - List get props => []; -} +class GetStoredOidcConfigurationLoading extends LoadingState {} class GetStoredOidcConfigurationSuccess extends UIState { final OIDCConfiguration oidcConfiguration; @@ -20,10 +14,6 @@ class GetStoredOidcConfigurationSuccess extends UIState { } class GetStoredOidcConfigurationFailure extends FeatureFailure { - final dynamic exception; - GetStoredOidcConfigurationFailure(this.exception); - - @override - List get props => [exception]; + GetStoredOidcConfigurationFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_stored_token_oidc_state.dart b/lib/features/login/domain/state/get_stored_token_oidc_state.dart index 958f74d36..a8d30356d 100644 --- a/lib/features/login/domain/state/get_stored_token_oidc_state.dart +++ b/lib/features/login/domain/state/get_stored_token_oidc_state.dart @@ -15,13 +15,6 @@ class GetStoredTokenOidcSuccess extends UIState { } class GetStoredTokenOidcFailure extends FeatureFailure { - final dynamic exception; - GetStoredTokenOidcFailure(this.exception); - - @override - bool? get stringify => true; - - @override - List get props => [exception]; + GetStoredTokenOidcFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/get_token_oidc_state.dart b/lib/features/login/domain/state/get_token_oidc_state.dart index ea1f187d9..53d72d941 100644 --- a/lib/features/login/domain/state/get_token_oidc_state.dart +++ b/lib/features/login/domain/state/get_token_oidc_state.dart @@ -1,13 +1,9 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/oidc/oidc_configuration.dart'; +import 'package:model/oidc/token_oidc.dart'; -class GetTokenOIDCLoading extends LoadingState { - - GetTokenOIDCLoading(); - - @override - List get props => []; -} +class GetTokenOIDCLoading extends LoadingState {} class GetTokenOIDCSuccess extends UIState { @@ -23,7 +19,4 @@ class GetTokenOIDCSuccess extends UIState { class GetTokenOIDCFailure extends FeatureFailure { GetTokenOIDCFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/login/domain/state/refresh_token_oidc_state.dart b/lib/features/login/domain/state/refresh_token_oidc_state.dart index 70b4767fb..7680d7c45 100644 --- a/lib/features/login/domain/state/refresh_token_oidc_state.dart +++ b/lib/features/login/domain/state/refresh_token_oidc_state.dart @@ -1,5 +1,6 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/oidc/token_oidc.dart'; class RefreshTokenOIDCSuccess extends UIState { @@ -12,10 +13,6 @@ class RefreshTokenOIDCSuccess extends UIState { } class RefreshTokenOIDCFailure extends FeatureFailure { - final dynamic exception; - RefreshTokenOIDCFailure(this.exception); - - @override - List get props => [exception]; + RefreshTokenOIDCFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/save_recent_login_url_state.dart b/lib/features/login/domain/state/save_recent_login_url_state.dart index 4932b9ac7..6086ade13 100644 --- a/lib/features/login/domain/state/save_recent_login_url_state.dart +++ b/lib/features/login/domain/state/save_recent_login_url_state.dart @@ -1,20 +1,9 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class SaveRecentLoginUrlSuccess extends UIState { - - SaveRecentLoginUrlSuccess(); - - @override - List get props => []; -} +class SaveRecentLoginUrlSuccess extends UIState {} class SaveRecentLoginUrlFailed extends FeatureFailure { - final dynamic exception; - - SaveRecentLoginUrlFailed(this.exception); - - @override - List get props => [exception]; + SaveRecentLoginUrlFailed(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/save_recent_login_username_state.dart b/lib/features/login/domain/state/save_recent_login_username_state.dart index 5ae227914..8fdcf4a90 100644 --- a/lib/features/login/domain/state/save_recent_login_username_state.dart +++ b/lib/features/login/domain/state/save_recent_login_username_state.dart @@ -1,20 +1,9 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class SaveRecentLoginUsernameSuccess extends UIState { - - SaveRecentLoginUsernameSuccess(); - - @override - List get props => []; -} +class SaveRecentLoginUsernameSuccess extends UIState {} class SaveRecentLoginUsernameFailed extends FeatureFailure { - final dynamic exception; - - SaveRecentLoginUsernameFailed(this.exception); - - @override - List get props => [exception]; + SaveRecentLoginUsernameFailed(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/login/domain/state/update_authentication_account_state.dart b/lib/features/login/domain/state/update_authentication_account_state.dart index b0aa0540f..c5d1931ed 100644 --- a/lib/features/login/domain/state/update_authentication_account_state.dart +++ b/lib/features/login/domain/state/update_authentication_account_state.dart @@ -3,19 +3,9 @@ import 'package:core/presentation/state/success.dart'; class UpdateAuthenticationAccountLoading extends LoadingState {} -class UpdateAuthenticationAccountSuccess extends UIState { - - UpdateAuthenticationAccountSuccess(); - - @override - List get props => []; -} +class UpdateAuthenticationAccountSuccess extends UIState {} class UpdateAuthenticationAccountFailure extends FeatureFailure { - final dynamic exception; - UpdateAuthenticationAccountFailure(this.exception); - - @override - List get props => [exception]; + UpdateAuthenticationAccountFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/create_new_mailbox_state.dart b/lib/features/mailbox/domain/state/create_new_mailbox_state.dart index 91c0e270a..ada9c183f 100644 --- a/lib/features/mailbox/domain/state/create_new_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/create_new_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; @@ -15,14 +16,10 @@ class CreateNewMailboxSuccess extends UIActionState { }) : super(currentEmailState, currentMailboxState); @override - List get props => [newMailbox]; + List get props => [newMailbox, ...super.props]; } class CreateNewMailboxFailure extends FeatureFailure { - final dynamic exception; - CreateNewMailboxFailure(this.exception); - - @override - List get props => [exception]; + CreateNewMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/delete_multiple_mailbox_state.dart b/lib/features/mailbox/domain/state/delete_multiple_mailbox_state.dart index 88182b3b8..dc4ce30f2 100644 --- a/lib/features/mailbox/domain/state/delete_multiple_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/delete_multiple_mailbox_state.dart @@ -16,7 +16,7 @@ class DeleteMultipleMailboxAllSuccess extends UIActionState { }) : super(currentEmailState, currentMailboxState); @override - List get props => [listMailboxIdDeleted]; + List get props => [listMailboxIdDeleted, ...super.props]; } class DeleteMultipleMailboxHasSomeSuccess extends UIActionState { @@ -29,22 +29,12 @@ class DeleteMultipleMailboxHasSomeSuccess extends UIActionState { }) : super(currentEmailState, currentMailboxState); @override - List get props => [listMailboxIdDeleted]; + List get props => [listMailboxIdDeleted, ...super.props]; } -class DeleteMultipleMailboxAllFailure extends FeatureFailure { - - DeleteMultipleMailboxAllFailure(); - - @override - List get props => []; -} +class DeleteMultipleMailboxAllFailure extends FeatureFailure {} class DeleteMultipleMailboxFailure extends FeatureFailure { - final dynamic exception; - DeleteMultipleMailboxFailure(this.exception); - - @override - List get props => [exception]; + DeleteMultipleMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/get_all_mailboxes_state.dart b/lib/features/mailbox/domain/state/get_all_mailboxes_state.dart index 9274f46b2..eccd11059 100644 --- a/lib/features/mailbox/domain/state/get_all_mailboxes_state.dart +++ b/lib/features/mailbox/domain/state/get_all_mailboxes_state.dart @@ -16,10 +16,6 @@ class GetAllMailboxSuccess extends UIState { } class GetAllMailboxFailure extends FeatureFailure { - final dynamic exception; - GetAllMailboxFailure(this.exception); - - @override - List get props => [exception]; + GetAllMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/mark_as_mailbox_read_state.dart b/lib/features/mailbox/domain/state/mark_as_mailbox_read_state.dart index 129193458..19ddb8299 100644 --- a/lib/features/mailbox/domain/state/mark_as_mailbox_read_state.dart +++ b/lib/features/mailbox/domain/state/mark_as_mailbox_read_state.dart @@ -1,15 +1,10 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; -class MarkAsMailboxReadLoading extends UIState { - - MarkAsMailboxReadLoading(); - - @override - List get props => []; -} +class MarkAsMailboxReadLoading extends UIState {} class UpdatingMarkAsMailboxReadState extends UIState { @@ -38,7 +33,10 @@ class MarkAsMailboxReadAllSuccess extends UIActionState { ) : super(currentMailboxState, currentEmailState); @override - List get props => [mailboxDisplayName]; + List get props => [ + mailboxDisplayName, + ...super.props + ]; } class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState { @@ -56,22 +54,16 @@ class MarkAsMailboxReadHasSomeEmailFailure extends UIActionState { ) : super(currentMailboxState, currentEmailState); @override - List get props => [mailboxDisplayName, countEmailsRead]; + List get props => [ + mailboxDisplayName, + countEmailsRead, + ...super.props + ]; } -class MarkAsMailboxReadAllFailure extends FeatureFailure { - - MarkAsMailboxReadAllFailure(); - - @override - List get props => []; -} +class MarkAsMailboxReadAllFailure extends FeatureFailure {} class MarkAsMailboxReadFailure extends FeatureFailure { - final dynamic exception; - MarkAsMailboxReadFailure(this.exception); - - @override - List get props => [exception]; + MarkAsMailboxReadFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/move_mailbox_state.dart b/lib/features/mailbox/domain/state/move_mailbox_state.dart index 7893ac1fb..1b9a8a579 100644 --- a/lib/features/mailbox/domain/state/move_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/move_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:tmail_ui_user/features/email/domain/model/move_action.dart'; @@ -40,7 +41,4 @@ class MoveMailboxSuccess extends UIActionState { class MoveMailboxFailure extends FeatureFailure { MoveMailboxFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/refresh_changes_all_mailboxes_state.dart b/lib/features/mailbox/domain/state/refresh_changes_all_mailboxes_state.dart index 6e1997474..d9f7a5985 100644 --- a/lib/features/mailbox/domain/state/refresh_changes_all_mailboxes_state.dart +++ b/lib/features/mailbox/domain/state/refresh_changes_all_mailboxes_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart'; import 'package:model/mailbox/presentation_mailbox.dart'; @@ -16,10 +17,6 @@ class RefreshChangesAllMailboxSuccess extends UIState { } class RefreshChangesAllMailboxFailure extends FeatureFailure { - final dynamic exception; - RefreshChangesAllMailboxFailure(this.exception); - - @override - List get props => [exception]; + RefreshChangesAllMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/rename_mailbox_state.dart b/lib/features/mailbox/domain/state/rename_mailbox_state.dart index b4e046c4d..988f8760f 100644 --- a/lib/features/mailbox/domain/state/rename_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/rename_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; @@ -10,16 +11,9 @@ class RenameMailboxSuccess extends UIActionState { jmap.State? currentEmailState, jmap.State? currentMailboxState, }) : super(currentEmailState, currentMailboxState); - - @override - List get props => []; } class RenameMailboxFailure extends FeatureFailure { - final dynamic exception; - RenameMailboxFailure(this.exception); - - @override - List get props => [exception]; + RenameMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/search_mailbox_state.dart b/lib/features/mailbox/domain/state/search_mailbox_state.dart index 1a90df1ea..33b1c973e 100644 --- a/lib/features/mailbox/domain/state/search_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/search_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:model/mailbox/presentation_mailbox.dart'; class LoadingSearchMailbox extends UIState {} @@ -14,10 +15,6 @@ class SearchMailboxSuccess extends UIState { } class SearchMailboxFailure extends FeatureFailure { - final dynamic exception; - SearchMailboxFailure(this.exception); - - @override - List get props => [exception]; + SearchMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/subscribe_mailbox_state.dart b/lib/features/mailbox/domain/state/subscribe_mailbox_state.dart index 1901736ad..ca4503cea 100644 --- a/lib/features/mailbox/domain/state/subscribe_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/subscribe_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; @@ -23,15 +24,11 @@ class SubscribeMailboxSuccess extends UIActionState { List get props => [ mailboxId, subscribeAction, - super.props + ...super.props ]; } class SubscribeMailboxFailure extends FeatureFailure { - final dynamic exception; - SubscribeMailboxFailure(this.exception); - - @override - List get props => [exception]; + SubscribeMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox/domain/state/subscribe_multiple_mailbox_state.dart b/lib/features/mailbox/domain/state/subscribe_multiple_mailbox_state.dart index e8af12fbc..2f22eff12 100644 --- a/lib/features/mailbox/domain/state/subscribe_multiple_mailbox_state.dart +++ b/lib/features/mailbox/domain/state/subscribe_multiple_mailbox_state.dart @@ -28,7 +28,7 @@ class SubscribeMultipleMailboxAllSuccess extends UIActionState { parentMailboxId, mailboxIdsSubscribe, subscribeAction, - super.props + ...super.props ]; } @@ -53,23 +53,13 @@ class SubscribeMultipleMailboxHasSomeSuccess extends UIActionState { parentMailboxId, mailboxIdsSubscribe, subscribeAction, - super.props + ...super.props ]; } -class SubscribeMultipleMailboxAllFailure extends FeatureFailure { - - SubscribeMultipleMailboxAllFailure(); - - @override - List get props => []; -} +class SubscribeMultipleMailboxAllFailure extends FeatureFailure {} class SubscribeMultipleMailboxFailure extends FeatureFailure { - final dynamic exception; - SubscribeMultipleMailboxFailure(this.exception); - - @override - List get props => [exception]; + SubscribeMultipleMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_creator/domain/state/verify_name_view_state.dart b/lib/features/mailbox_creator/domain/state/verify_name_view_state.dart index 93e9b2a77..cd2fe8336 100644 --- a/lib/features/mailbox_creator/domain/state/verify_name_view_state.dart +++ b/lib/features/mailbox_creator/domain/state/verify_name_view_state.dart @@ -1,17 +1,9 @@ +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -import 'package:core/core.dart'; - -class VerifyNameViewState extends UIState { - VerifyNameViewState(); - - @override - List get props => []; -} +class VerifyNameViewState extends UIState {} class VerifyNameFailure extends FeatureFailure { - final dynamic exception; - VerifyNameFailure(this.exception); - @override - List get props => [exception]; + VerifyNameFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/delete_last_time_dismissed_spam_reported_state.dart b/lib/features/mailbox_dashboard/domain/state/delete_last_time_dismissed_spam_reported_state.dart index e22f8de0d..7b26f6524 100644 --- a/lib/features/mailbox_dashboard/domain/state/delete_last_time_dismissed_spam_reported_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/delete_last_time_dismissed_spam_reported_state.dart @@ -3,19 +3,9 @@ import 'package:core/presentation/state/success.dart'; class DeleteLastTimeDismissedSpamReportedLoading extends UIState {} -class DeleteLastTimeDismissedSpamReportedSuccess extends UIState { - - DeleteLastTimeDismissedSpamReportedSuccess(); - - @override - List get props => []; -} +class DeleteLastTimeDismissedSpamReportedSuccess extends UIState {} class DeleteLastTimeDismissedSpamReportedFailure extends FeatureFailure { - final dynamic exception; - DeleteLastTimeDismissedSpamReportedFailure(this.exception); - - @override - List get props => [exception]; + DeleteLastTimeDismissedSpamReportedFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/delete_spam_report_state.dart b/lib/features/mailbox_dashboard/domain/state/delete_spam_report_state.dart index 5055347fa..dc14e2339 100644 --- a/lib/features/mailbox_dashboard/domain/state/delete_spam_report_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/delete_spam_report_state.dart @@ -3,19 +3,9 @@ import 'package:core/presentation/state/success.dart'; class DeleteSpamReportStateLoading extends UIState {} -class DeleteSpamReportStateSuccess extends UIState { - - DeleteSpamReportStateSuccess(); - - @override - List get props => []; -} +class DeleteSpamReportStateSuccess extends UIState {} class DeleteSpamReportStateFailure extends FeatureFailure { - final dynamic exception; - DeleteSpamReportStateFailure(this.exception); - - @override - List get props => [exception]; + DeleteSpamReportStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_all_recent_search_latest_state.dart b/lib/features/mailbox_dashboard/domain/state/get_all_recent_search_latest_state.dart index 276df975e..db14c3f96 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_all_recent_search_latest_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_all_recent_search_latest_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/domain/model/recent_search.dart'; class GetAllRecentSearchLatestSuccess extends UIState { @@ -12,10 +13,6 @@ class GetAllRecentSearchLatestSuccess extends UIState { } class GetAllRecentSearchLatestFailure extends FeatureFailure { - final dynamic exception; - GetAllRecentSearchLatestFailure(this.exception); - - @override - List get props => [exception]; + GetAllRecentSearchLatestFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_app_dashboard_configuration_state.dart b/lib/features/mailbox_dashboard/domain/state/get_app_dashboard_configuration_state.dart index 188900a08..644fc1ff0 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_app_dashboard_configuration_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_app_dashboard_configuration_state.dart @@ -15,10 +15,6 @@ class GetAppDashboardConfigurationSuccess extends UIState { } class GetAppDashboardConfigurationFailure extends FeatureFailure { - final dynamic exception; - GetAppDashboardConfigurationFailure(this.exception); - - @override - List get props => [exception]; + GetAppDashboardConfigurationFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_composer_cache_state.dart b/lib/features/mailbox_dashboard/domain/state/get_composer_cache_state.dart index 62cfd1044..c02f57359 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_composer_cache_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_composer_cache_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/data/model/composer_cache.dart'; class GetComposerCacheSuccess extends UIState { @@ -12,10 +13,6 @@ class GetComposerCacheSuccess extends UIState { } class GetComposerCacheFailure extends FeatureFailure { - final dynamic exception; - GetComposerCacheFailure(this.exception); - - @override - List get props => [exception]; + GetComposerCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_number_of_unread_spam_emails_state.dart b/lib/features/mailbox_dashboard/domain/state/get_number_of_unread_spam_emails_state.dart index a74170598..14da03853 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_number_of_unread_spam_emails_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_number_of_unread_spam_emails_state.dart @@ -19,10 +19,6 @@ class InvalidSpamReportCondition extends FeatureFailure { } class GetUnreadSpamMailboxFailure extends FeatureFailure { - final dynamic exception; - GetUnreadSpamMailboxFailure(this.exception); - - @override - List get props => [exception]; + GetUnreadSpamMailboxFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_spam_mailbox_cached_state.dart b/lib/features/mailbox_dashboard/domain/state/get_spam_mailbox_cached_state.dart index 2d1122541..d03094bf1 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_spam_mailbox_cached_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_spam_mailbox_cached_state.dart @@ -17,7 +17,4 @@ class GetSpamMailboxCachedSuccess extends UIState { class GetSpamMailboxCachedFailure extends FeatureFailure { GetSpamMailboxCachedFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_spam_report_state.dart b/lib/features/mailbox_dashboard/domain/state/get_spam_report_state.dart index 75e909331..2d5b34157 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_spam_report_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_spam_report_state.dart @@ -14,10 +14,6 @@ class GetSpamReportStateSuccess extends UIState { } class GetSpamReportStateFailure extends FeatureFailure { - final dynamic exception; - GetSpamReportStateFailure(this.exception); - - @override - List get props => [exception]; + GetSpamReportStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/get_user_profile_state.dart b/lib/features/mailbox_dashboard/domain/state/get_user_profile_state.dart index 3ad68ded7..0598dd21c 100644 --- a/lib/features/mailbox_dashboard/domain/state/get_user_profile_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/get_user_profile_state.dart @@ -1,5 +1,6 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/user/user_profile.dart'; class GetUserProfileSuccess extends UIState { final UserProfile userProfile; @@ -11,10 +12,6 @@ class GetUserProfileSuccess extends UIState { } class GetUserProfileFailure extends FeatureFailure { - final dynamic exception; - GetUserProfileFailure(this.exception); - - @override - List get props => [exception]; + GetUserProfileFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/quick_search_email_state.dart b/lib/features/mailbox_dashboard/domain/state/quick_search_email_state.dart index 713460a7d..80573edb4 100644 --- a/lib/features/mailbox_dashboard/domain/state/quick_search_email_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/quick_search_email_state.dart @@ -1,5 +1,5 @@ - -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:model/email/presentation_email.dart'; class QuickSearchEmailSuccess extends UIState { @@ -12,10 +12,6 @@ class QuickSearchEmailSuccess extends UIState { } class QuickSearchEmailFailure extends FeatureFailure { - final dynamic exception; - QuickSearchEmailFailure(this.exception); - - @override - List get props => [exception]; + QuickSearchEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/remove_composer_cache_state.dart b/lib/features/mailbox_dashboard/domain/state/remove_composer_cache_state.dart index 5ac492371..04460eda1 100644 --- a/lib/features/mailbox_dashboard/domain/state/remove_composer_cache_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/remove_composer_cache_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; class RemoveComposerCacheSuccess extends UIState { @@ -9,10 +10,6 @@ class RemoveComposerCacheSuccess extends UIState { } class RemoveComposerCacheFailure extends FeatureFailure { - final dynamic exception; - RemoveComposerCacheFailure(this.exception); - - @override - List get props => [exception]; + RemoveComposerCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/remove_email_drafts_state.dart b/lib/features/mailbox_dashboard/domain/state/remove_email_drafts_state.dart index b9f534335..97bf45dde 100644 --- a/lib/features/mailbox_dashboard/domain/state/remove_email_drafts_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/remove_email_drafts_state.dart @@ -1,4 +1,4 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; @@ -8,16 +8,9 @@ class RemoveEmailDraftsSuccess extends UIActionState { jmap.State? currentEmailState, jmap.State? currentMailboxState, }) : super(currentEmailState, currentMailboxState); - - @override - List get props => []; } class RemoveEmailDraftsFailure extends FeatureFailure { - final dynamic exception; - RemoveEmailDraftsFailure(this.exception); - - @override - List get props => [exception]; + RemoveEmailDraftsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/save_composer_cache_state.dart b/lib/features/mailbox_dashboard/domain/state/save_composer_cache_state.dart index adf4ebc35..c4119537b 100644 --- a/lib/features/mailbox_dashboard/domain/state/save_composer_cache_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/save_composer_cache_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class SaveComposerCacheSuccess extends UIState { - - SaveComposerCacheSuccess(); - - @override - List get props => []; -} +class SaveComposerCacheSuccess extends UIState {} class SaveComposerCacheFailure extends FeatureFailure { - final dynamic exception; - SaveComposerCacheFailure(this.exception); - - @override - List get props => [exception]; + SaveComposerCacheFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/save_recent_search_state.dart b/lib/features/mailbox_dashboard/domain/state/save_recent_search_state.dart index 62d77c2b8..c78b824cb 100644 --- a/lib/features/mailbox_dashboard/domain/state/save_recent_search_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/save_recent_search_state.dart @@ -1,18 +1,9 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -class SaveRecentSearchSuccess extends UIState { - - SaveRecentSearchSuccess(); - - @override - List get props => []; -} +class SaveRecentSearchSuccess extends UIState {} class SaveRecentSearchFailure extends FeatureFailure { - final dynamic exception; - SaveRecentSearchFailure(this.exception); - - @override - List get props => [exception]; + SaveRecentSearchFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/store_last_time_dismissed_spam_reported_state.dart b/lib/features/mailbox_dashboard/domain/state/store_last_time_dismissed_spam_reported_state.dart index d8b1eddba..5cdfe2ad6 100644 --- a/lib/features/mailbox_dashboard/domain/state/store_last_time_dismissed_spam_reported_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/store_last_time_dismissed_spam_reported_state.dart @@ -3,19 +3,9 @@ import 'package:core/presentation/state/success.dart'; class StoreLastTimeDismissedSpamReportLoading extends UIState {} -class StoreLastTimeDismissedSpamReportSuccess extends UIState { - - StoreLastTimeDismissedSpamReportSuccess(); - - @override - List get props => []; -} +class StoreLastTimeDismissedSpamReportSuccess extends UIState {} class StoreLastTimeDismissedSpamReportFailure extends FeatureFailure { - final dynamic exception; - StoreLastTimeDismissedSpamReportFailure(this.exception); - - @override - List get props => [exception]; + StoreLastTimeDismissedSpamReportFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/mailbox_dashboard/domain/state/store_spam_report_state.dart b/lib/features/mailbox_dashboard/domain/state/store_spam_report_state.dart index b6240f535..5ecaa1da4 100644 --- a/lib/features/mailbox_dashboard/domain/state/store_spam_report_state.dart +++ b/lib/features/mailbox_dashboard/domain/state/store_spam_report_state.dart @@ -10,14 +10,10 @@ class StoreSpamReportStateSuccess extends UIState { StoreSpamReportStateSuccess(this.spamReportState); @override - List get props => []; + List get props => [spamReportState]; } class StoreSpamReportStateFailure extends FeatureFailure { - final dynamic exception; - StoreSpamReportStateFailure(this.exception); - - @override - List get props => [exception]; + StoreSpamReportStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/add_recipient_in_forwarding_state.dart b/lib/features/manage_account/domain/state/add_recipient_in_forwarding_state.dart index acb36f6fc..8a957c1f8 100644 --- a/lib/features/manage_account/domain/state/add_recipient_in_forwarding_state.dart +++ b/lib/features/manage_account/domain/state/add_recipient_in_forwarding_state.dart @@ -12,10 +12,6 @@ class AddRecipientsInForwardingSuccess extends UIState { } class AddRecipientsInForwardingFailure extends FeatureFailure { - final dynamic exception; - AddRecipientsInForwardingFailure(this.exception); - - @override - List get props => [exception]; + AddRecipientsInForwardingFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/create_new_default_identity_state.dart b/lib/features/manage_account/domain/state/create_new_default_identity_state.dart index 639c08b78..3d6c67522 100644 --- a/lib/features/manage_account/domain/state/create_new_default_identity_state.dart +++ b/lib/features/manage_account/domain/state/create_new_default_identity_state.dart @@ -14,10 +14,6 @@ class CreateNewDefaultIdentitySuccess extends UIState { } class CreateNewDefaultIdentityFailure extends FeatureFailure { - final dynamic exception; - CreateNewDefaultIdentityFailure(this.exception); - - @override - List get props => [exception]; + CreateNewDefaultIdentityFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/create_new_identity_state.dart b/lib/features/manage_account/domain/state/create_new_identity_state.dart index 6483b5052..612f91efa 100644 --- a/lib/features/manage_account/domain/state/create_new_identity_state.dart +++ b/lib/features/manage_account/domain/state/create_new_identity_state.dart @@ -14,10 +14,6 @@ class CreateNewIdentitySuccess extends UIState { } class CreateNewIdentityFailure extends FeatureFailure { - final dynamic exception; - CreateNewIdentityFailure(this.exception); - - @override - List get props => [exception]; + CreateNewIdentityFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/create_new_rule_filter_state.dart b/lib/features/manage_account/domain/state/create_new_rule_filter_state.dart index b1fc64e25..81f484d9f 100644 --- a/lib/features/manage_account/domain/state/create_new_rule_filter_state.dart +++ b/lib/features/manage_account/domain/state/create_new_rule_filter_state.dart @@ -13,10 +13,6 @@ class CreateNewRuleFilterSuccess extends UIState { } class CreateNewRuleFilterFailure extends FeatureFailure { - final dynamic exception; - CreateNewRuleFilterFailure(this.exception); - - @override - List get props => [exception]; + CreateNewRuleFilterFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/delete_email_rule_state.dart b/lib/features/manage_account/domain/state/delete_email_rule_state.dart index 82f6157a1..bb8ee9d75 100644 --- a/lib/features/manage_account/domain/state/delete_email_rule_state.dart +++ b/lib/features/manage_account/domain/state/delete_email_rule_state.dart @@ -11,10 +11,6 @@ class DeleteEmailRuleSuccess extends UIState { } class DeleteEmailRuleFailure extends FeatureFailure { - final dynamic exception; - DeleteEmailRuleFailure(this.exception); - - @override - List get props => [exception]; + DeleteEmailRuleFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/delete_identity_state.dart b/lib/features/manage_account/domain/state/delete_identity_state.dart index e4beea8f4..1d6cb7d4d 100644 --- a/lib/features/manage_account/domain/state/delete_identity_state.dart +++ b/lib/features/manage_account/domain/state/delete_identity_state.dart @@ -11,10 +11,6 @@ class DeleteIdentitySuccess extends UIState { } class DeleteIdentityFailure extends FeatureFailure { - final dynamic exception; - DeleteIdentityFailure(this.exception); - - @override - List get props => [exception]; + DeleteIdentityFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/delete_recipient_in_forwarding_state.dart b/lib/features/manage_account/domain/state/delete_recipient_in_forwarding_state.dart index 2af7df7e2..e2506d494 100644 --- a/lib/features/manage_account/domain/state/delete_recipient_in_forwarding_state.dart +++ b/lib/features/manage_account/domain/state/delete_recipient_in_forwarding_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:forward/forward/tmail_forward.dart'; -class StartDeleteRecipientInForwarding extends UIState { - - StartDeleteRecipientInForwarding(); - - @override - List get props => []; -} +class StartDeleteRecipientInForwarding extends UIState {} class DeleteRecipientInForwardingSuccess extends UIState { final TMailForward forward; @@ -20,10 +14,6 @@ class DeleteRecipientInForwardingSuccess extends UIState { } class DeleteRecipientInForwardingFailure extends FeatureFailure { - final dynamic exception; - DeleteRecipientInForwardingFailure(this.exception); - - @override - List get props => [exception]; + DeleteRecipientInForwardingFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/edit_default_identity_state.dart b/lib/features/manage_account/domain/state/edit_default_identity_state.dart index 53537d6e3..99e61284c 100644 --- a/lib/features/manage_account/domain/state/edit_default_identity_state.dart +++ b/lib/features/manage_account/domain/state/edit_default_identity_state.dart @@ -1,21 +1,12 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:tmail_ui_user/features/manage_account/domain/state/edit_identity_state.dart'; class EditDefaultIdentityLoading extends UIState {} -class EditDefaultIdentitySuccess extends EditIdentitySuccess { - - EditDefaultIdentitySuccess(); - - @override - List get props => []; -} +class EditDefaultIdentitySuccess extends EditIdentitySuccess {} class EditDefaultIdentityFailure extends FeatureFailure { - final dynamic exception; - EditDefaultIdentityFailure(this.exception); - - @override - List get props => [exception]; + EditDefaultIdentityFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/edit_email_rule_filter_state.dart b/lib/features/manage_account/domain/state/edit_email_rule_filter_state.dart index bb0a7f909..daee520a4 100644 --- a/lib/features/manage_account/domain/state/edit_email_rule_filter_state.dart +++ b/lib/features/manage_account/domain/state/edit_email_rule_filter_state.dart @@ -13,10 +13,6 @@ class EditEmailRuleFilterSuccess extends UIState { } class EditEmailRuleFilterFailure extends FeatureFailure { - final dynamic exception; - EditEmailRuleFilterFailure(this.exception); - - @override - List get props => [exception]; + EditEmailRuleFilterFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/edit_identity_state.dart b/lib/features/manage_account/domain/state/edit_identity_state.dart index e598cd87f..8d403ad4c 100644 --- a/lib/features/manage_account/domain/state/edit_identity_state.dart +++ b/lib/features/manage_account/domain/state/edit_identity_state.dart @@ -1,20 +1,11 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; class EditIdentityLoading extends UIState {} -class EditIdentitySuccess extends UIState { - - EditIdentitySuccess(); - - @override - List get props => []; -} +class EditIdentitySuccess extends UIState {} class EditIdentityFailure extends FeatureFailure { - final dynamic exception; - EditIdentityFailure(this.exception); - - @override - List get props => [exception]; + EditIdentityFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/edit_local_copy_in_forwarding_state.dart b/lib/features/manage_account/domain/state/edit_local_copy_in_forwarding_state.dart index e7699ce36..fc0da82a8 100644 --- a/lib/features/manage_account/domain/state/edit_local_copy_in_forwarding_state.dart +++ b/lib/features/manage_account/domain/state/edit_local_copy_in_forwarding_state.dart @@ -12,10 +12,6 @@ class EditLocalCopyInForwardingSuccess extends UIState { } class EditLocalCopyInForwardingFailure extends FeatureFailure { - final dynamic exception; - EditLocalCopyInForwardingFailure(this.exception); - - @override - List get props => [exception]; + EditLocalCopyInForwardingFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/get_all_identities_state.dart b/lib/features/manage_account/domain/state/get_all_identities_state.dart index 0530a13f9..d35504208 100644 --- a/lib/features/manage_account/domain/state/get_all_identities_state.dart +++ b/lib/features/manage_account/domain/state/get_all_identities_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart'; import 'package:jmap_dart_client/jmap/identities/identity.dart'; @@ -15,10 +16,6 @@ class GetAllIdentitiesSuccess extends UIState { } class GetAllIdentitiesFailure extends FeatureFailure { - final dynamic exception; - GetAllIdentitiesFailure(this.exception); - - @override - List get props => [exception]; + GetAllIdentitiesFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/get_all_rules_state.dart b/lib/features/manage_account/domain/state/get_all_rules_state.dart index 05a217347..d512a2d4e 100644 --- a/lib/features/manage_account/domain/state/get_all_rules_state.dart +++ b/lib/features/manage_account/domain/state/get_all_rules_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:rule_filter/rule_filter/tmail_rule.dart'; class GetAllRulesSuccess extends UIState { @@ -11,10 +12,6 @@ class GetAllRulesSuccess extends UIState { } class GetAllRulesFailure extends FeatureFailure { - final dynamic exception; - GetAllRulesFailure(this.exception); - - @override - List get props => [exception]; + GetAllRulesFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/get_all_vacation_state.dart b/lib/features/manage_account/domain/state/get_all_vacation_state.dart index 075601353..ae02c7c65 100644 --- a/lib/features/manage_account/domain/state/get_all_vacation_state.dart +++ b/lib/features/manage_account/domain/state/get_all_vacation_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/vacation/vacation_response.dart'; -class LoadingGetAllVacation extends UIState { - - LoadingGetAllVacation(); - - @override - List get props => []; -} +class LoadingGetAllVacation extends UIState {} class GetAllVacationSuccess extends UIState { final List listVacationResponse; @@ -20,10 +14,6 @@ class GetAllVacationSuccess extends UIState { } class GetAllVacationFailure extends FeatureFailure { - final dynamic exception; - GetAllVacationFailure(this.exception); - - @override - List get props => [exception]; + GetAllVacationFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/get_forward_state.dart b/lib/features/manage_account/domain/state/get_forward_state.dart index a29f77bd9..d00161970 100644 --- a/lib/features/manage_account/domain/state/get_forward_state.dart +++ b/lib/features/manage_account/domain/state/get_forward_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:forward/forward/tmail_forward.dart'; class GetForwardSuccess extends UIState { @@ -11,10 +12,6 @@ class GetForwardSuccess extends UIState { } class GetForwardFailure extends FeatureFailure { - final dynamic exception; - GetForwardFailure(this.exception); - - @override - List get props => [exception]; + GetForwardFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/log_out_oidc_state.dart b/lib/features/manage_account/domain/state/log_out_oidc_state.dart index e1c63299b..e2ddfde13 100644 --- a/lib/features/manage_account/domain/state/log_out_oidc_state.dart +++ b/lib/features/manage_account/domain/state/log_out_oidc_state.dart @@ -2,19 +2,9 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class LogoutOidcSuccess extends UIState { - - LogoutOidcSuccess(); - - @override - List get props => []; -} +class LogoutOidcSuccess extends UIState {} class LogoutOidcFailure extends FeatureFailure { - final dynamic exception; - LogoutOidcFailure(this.exception); - - @override - List get props => [exception]; + LogoutOidcFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/save_language_state.dart b/lib/features/manage_account/domain/state/save_language_state.dart index c71b3bc92..b1ffb4f4b 100644 --- a/lib/features/manage_account/domain/state/save_language_state.dart +++ b/lib/features/manage_account/domain/state/save_language_state.dart @@ -1,14 +1,8 @@ import 'dart:ui'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; -import 'package:core/core.dart'; - -class SavingLanguage extends UIState { - - SavingLanguage(); - - @override - List get props => []; -} +class SavingLanguage extends UIState {} class SaveLanguageSuccess extends UIState { @@ -21,10 +15,6 @@ class SaveLanguageSuccess extends UIState { } class SaveLanguageFailure extends FeatureFailure { - final dynamic exception; - SaveLanguageFailure(this.exception); - - @override - List get props => [exception]; + SaveLanguageFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/transform_html_signature_state.dart b/lib/features/manage_account/domain/state/transform_html_signature_state.dart index c5405873b..cbb795689 100644 --- a/lib/features/manage_account/domain/state/transform_html_signature_state.dart +++ b/lib/features/manage_account/domain/state/transform_html_signature_state.dart @@ -1,13 +1,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; -class TransformHtmlSignatureLoading extends UIState { - - TransformHtmlSignatureLoading(); - - @override - List get props => []; -} +class TransformHtmlSignatureLoading extends UIState {} class TransformHtmlSignatureSuccess extends UIState { final String signature; @@ -21,7 +15,4 @@ class TransformHtmlSignatureSuccess extends UIState { class TransformHtmlSignatureFailure extends FeatureFailure { TransformHtmlSignatureFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/manage_account/domain/state/update_vacation_state.dart b/lib/features/manage_account/domain/state/update_vacation_state.dart index cefd58cf2..faa605c76 100644 --- a/lib/features/manage_account/domain/state/update_vacation_state.dart +++ b/lib/features/manage_account/domain/state/update_vacation_state.dart @@ -2,13 +2,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/mail/vacation/vacation_response.dart'; -class LoadingUpdateVacation extends UIState { - - LoadingUpdateVacation(); - - @override - List get props => []; -} +class LoadingUpdateVacation extends UIState {} class UpdateVacationSuccess extends UIState { final List listVacationResponse; @@ -20,10 +14,6 @@ class UpdateVacationSuccess extends UIState { } class UpdateVacationFailure extends FeatureFailure { - final dynamic exception; - UpdateVacationFailure(this.exception); - - @override - List get props => [exception]; + UpdateVacationFailure(exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/delete_email_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/delete_email_state_to_refresh_state.dart index 4f8d2789c..da25563a6 100644 --- a/lib/features/push_notification/domain/state/delete_email_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/delete_email_state_to_refresh_state.dart @@ -13,10 +13,6 @@ class DeleteEmailStateToRefreshSuccess extends UIState { } class DeleteEmailStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - DeleteEmailStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + DeleteEmailStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/delete_mailbox_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/delete_mailbox_state_to_refresh_state.dart index 0f1b0fa3d..e72c30dc9 100644 --- a/lib/features/push_notification/domain/state/delete_mailbox_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/delete_mailbox_state_to_refresh_state.dart @@ -13,10 +13,6 @@ class DeleteMailboxStateToRefreshSuccess extends UIState { } class DeleteMailboxStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - DeleteMailboxStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + DeleteMailboxStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/destroy_subscription_state.dart b/lib/features/push_notification/domain/state/destroy_subscription_state.dart index 8fbe00669..6868ef40b 100644 --- a/lib/features/push_notification/domain/state/destroy_subscription_state.dart +++ b/lib/features/push_notification/domain/state/destroy_subscription_state.dart @@ -1,7 +1,6 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; - class DestroySubscriptionLoading extends UIState {} class DestroySubscriptionSuccess extends UIState { @@ -15,10 +14,6 @@ class DestroySubscriptionSuccess extends UIState { } class DestroySubscriptionFailure extends FeatureFailure { - final dynamic exception; - DestroySubscriptionFailure(this.exception); - - @override - List get props => [exception]; + DestroySubscriptionFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_email_changes_to_push_notification_state.dart b/lib/features/push_notification/domain/state/get_email_changes_to_push_notification_state.dart index 768df544c..2ec36d0f8 100644 --- a/lib/features/push_notification/domain/state/get_email_changes_to_push_notification_state.dart +++ b/lib/features/push_notification/domain/state/get_email_changes_to_push_notification_state.dart @@ -22,7 +22,4 @@ class GetEmailChangesToPushNotificationSuccess extends UIState { class GetEmailChangesToPushNotificationFailure extends FeatureFailure { GetEmailChangesToPushNotificationFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_email_changes_to_remove_notification_state.dart b/lib/features/push_notification/domain/state/get_email_changes_to_remove_notification_state.dart index 92cae03ef..e4e552cf4 100644 --- a/lib/features/push_notification/domain/state/get_email_changes_to_remove_notification_state.dart +++ b/lib/features/push_notification/domain/state/get_email_changes_to_remove_notification_state.dart @@ -18,7 +18,4 @@ class GetEmailChangesToRemoveNotificationSuccess extends UIState { class GetEmailChangesToRemoveNotificationFailure extends FeatureFailure { GetEmailChangesToRemoveNotificationFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_email_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/get_email_state_to_refresh_state.dart index 09572f1f4..b42787f4c 100644 --- a/lib/features/push_notification/domain/state/get_email_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/get_email_state_to_refresh_state.dart @@ -16,10 +16,6 @@ class GetEmailStateToRefreshSuccess extends UIState { } class GetEmailStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - GetEmailStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + GetEmailStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_fcm_subscription_local.dart b/lib/features/push_notification/domain/state/get_fcm_subscription_local.dart index 28441ead2..431783a0f 100644 --- a/lib/features/push_notification/domain/state/get_fcm_subscription_local.dart +++ b/lib/features/push_notification/domain/state/get_fcm_subscription_local.dart @@ -16,10 +16,6 @@ class GetFCMSubscriptionLocalSuccess extends UIState { } class GetFCMSubscriptionLocalFailure extends FeatureFailure { - final dynamic exception; - GetFCMSubscriptionLocalFailure(this.exception); - - @override - List get props => [exception]; + GetFCMSubscriptionLocalFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_firebase_subscription_state.dart b/lib/features/push_notification/domain/state/get_firebase_subscription_state.dart index 1bc799cc4..c9d714d8d 100644 --- a/lib/features/push_notification/domain/state/get_firebase_subscription_state.dart +++ b/lib/features/push_notification/domain/state/get_firebase_subscription_state.dart @@ -16,10 +16,6 @@ class GetFirebaseSubscriptionSuccess extends UIState { } class GetFirebaseSubscriptionFailure extends FeatureFailure { - final dynamic exception; - GetFirebaseSubscriptionFailure(this.exception); - - @override - List get props => [exception]; + GetFirebaseSubscriptionFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_mailbox_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/get_mailbox_state_to_refresh_state.dart index 92630a008..a834137fe 100644 --- a/lib/features/push_notification/domain/state/get_mailbox_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/get_mailbox_state_to_refresh_state.dart @@ -16,10 +16,6 @@ class GetMailboxStateToRefreshSuccess extends UIState { } class GetMailboxStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - GetMailboxStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + GetMailboxStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_mailboxes_not_put_notifications_state.dart b/lib/features/push_notification/domain/state/get_mailboxes_not_put_notifications_state.dart index 3e4cea235..86e1f90eb 100644 --- a/lib/features/push_notification/domain/state/get_mailboxes_not_put_notifications_state.dart +++ b/lib/features/push_notification/domain/state/get_mailboxes_not_put_notifications_state.dart @@ -18,7 +18,4 @@ class GetMailboxesNotPutNotificationsSuccess extends UIState { class GetMailboxesNotPutNotificationsFailure extends FeatureFailure { GetMailboxesNotPutNotificationsFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_new_receive_email_from_notification_state.dart b/lib/features/push_notification/domain/state/get_new_receive_email_from_notification_state.dart index 61fd251c4..d0cc03e70 100644 --- a/lib/features/push_notification/domain/state/get_new_receive_email_from_notification_state.dart +++ b/lib/features/push_notification/domain/state/get_new_receive_email_from_notification_state.dart @@ -22,7 +22,4 @@ class GetNewReceiveEmailFromNotificationSuccess extends UIState { class GetNewReceiveEmailFromNotificationFailure extends FeatureFailure { GetNewReceiveEmailFromNotificationFailure(exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_stored_email_delivery_state.dart b/lib/features/push_notification/domain/state/get_stored_email_delivery_state.dart index df2b43fd2..66156cc1c 100644 --- a/lib/features/push_notification/domain/state/get_stored_email_delivery_state.dart +++ b/lib/features/push_notification/domain/state/get_stored_email_delivery_state.dart @@ -16,10 +16,6 @@ class GetStoredEmailDeliveryStateSuccess extends UIState { } class GetStoredEmailDeliveryStateFailure extends FeatureFailure { - final dynamic exception; - GetStoredEmailDeliveryStateFailure(this.exception); - - @override - List get props => [exception]; + GetStoredEmailDeliveryStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/register_new_token_state.dart b/lib/features/push_notification/domain/state/register_new_token_state.dart index 8af418d86..522ddda99 100644 --- a/lib/features/push_notification/domain/state/register_new_token_state.dart +++ b/lib/features/push_notification/domain/state/register_new_token_state.dart @@ -16,10 +16,6 @@ class RegisterNewTokenSuccess extends UIState { } class RegisterNewTokenFailure extends FeatureFailure { - final dynamic exception; - RegisterNewTokenFailure(this.exception); - - @override - List get props => [exception]; + RegisterNewTokenFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/store_email_delivery_state.dart b/lib/features/push_notification/domain/state/store_email_delivery_state.dart index 638092629..0c8c59240 100644 --- a/lib/features/push_notification/domain/state/store_email_delivery_state.dart +++ b/lib/features/push_notification/domain/state/store_email_delivery_state.dart @@ -4,19 +4,9 @@ import 'package:core/presentation/state/success.dart'; class StoreEmailDeliveryStateLoading extends UIState {} -class StoreEmailDeliveryStateSuccess extends UIState { - - StoreEmailDeliveryStateSuccess(); - - @override - List get props => []; -} +class StoreEmailDeliveryStateSuccess extends UIState {} class StoreEmailDeliveryStateFailure extends FeatureFailure { - final dynamic exception; - StoreEmailDeliveryStateFailure(this.exception); - - @override - List get props => [exception]; + StoreEmailDeliveryStateFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/store_email_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/store_email_state_to_refresh_state.dart index 75a5b567a..7c588ebfe 100644 --- a/lib/features/push_notification/domain/state/store_email_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/store_email_state_to_refresh_state.dart @@ -4,19 +4,9 @@ import 'package:core/presentation/state/success.dart'; class StoreEmailStateToRefreshLoading extends UIState {} -class StoreEmailStateToRefreshSuccess extends UIState { - - StoreEmailStateToRefreshSuccess(); - - @override - List get props => []; -} +class StoreEmailStateToRefreshSuccess extends UIState {} class StoreEmailStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - StoreEmailStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + StoreEmailStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/store_mailbox_state_to_refresh_state.dart b/lib/features/push_notification/domain/state/store_mailbox_state_to_refresh_state.dart index fc48f5240..1c6039cbf 100644 --- a/lib/features/push_notification/domain/state/store_mailbox_state_to_refresh_state.dart +++ b/lib/features/push_notification/domain/state/store_mailbox_state_to_refresh_state.dart @@ -4,19 +4,9 @@ import 'package:core/presentation/state/success.dart'; class StoreMailboxStateToRefreshLoading extends UIState {} -class StoreMailboxStateToRefreshSuccess extends UIState { - - StoreMailboxStateToRefreshSuccess(); - - @override - List get props => []; -} +class StoreMailboxStateToRefreshSuccess extends UIState {} class StoreMailboxStateToRefreshFailure extends FeatureFailure { - final dynamic exception; - StoreMailboxStateToRefreshFailure(this.exception); - - @override - List get props => [exception]; + StoreMailboxStateToRefreshFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/store_subscription_state.dart b/lib/features/push_notification/domain/state/store_subscription_state.dart index 341f57e9d..de362f5f0 100644 --- a/lib/features/push_notification/domain/state/store_subscription_state.dart +++ b/lib/features/push_notification/domain/state/store_subscription_state.dart @@ -4,19 +4,9 @@ import 'package:core/presentation/state/success.dart'; class StoreSubscriptionLoading extends UIState {} -class StoreSubscriptionSuccess extends UIState { - - StoreSubscriptionSuccess(); - - @override - List get props => []; -} +class StoreSubscriptionSuccess extends UIState {} class StoreSubscriptionFailure extends FeatureFailure { - final dynamic exception; - StoreSubscriptionFailure(this.exception); - - @override - List get props => [exception]; + StoreSubscriptionFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/quotas/domain/state/get_quotas_state.dart b/lib/features/quotas/domain/state/get_quotas_state.dart index 7c2ff2e43..2a0399fea 100644 --- a/lib/features/quotas/domain/state/get_quotas_state.dart +++ b/lib/features/quotas/domain/state/get_quotas_state.dart @@ -16,10 +16,6 @@ class GetQuotasSuccess extends UIState { } class GetQuotasFailure extends FeatureFailure { - final dynamic exception; - GetQuotasFailure(this.exception); - - @override - List get props => [exception]; + GetQuotasFailure(dynamic exception) : super(exception: exception); } diff --git a/lib/features/search/email/domain/state/refresh_changes_search_email_state.dart b/lib/features/search/email/domain/state/refresh_changes_search_email_state.dart index 8d3339c40..950e36248 100644 --- a/lib/features/search/email/domain/state/refresh_changes_search_email_state.dart +++ b/lib/features/search/email/domain/state/refresh_changes_search_email_state.dart @@ -3,13 +3,7 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:model/email/presentation_email.dart'; -class RefreshingChangeSearchEmailState extends UIState { - - RefreshingChangeSearchEmailState(); - - @override - List get props => []; -} +class RefreshingChangeSearchEmailState extends UIState {} class RefreshChangesSearchEmailSuccess extends UIState { final List emailList; @@ -21,10 +15,6 @@ class RefreshChangesSearchEmailSuccess extends UIState { } class RefreshChangesSearchEmailFailure extends FeatureFailure { - final dynamic exception; - RefreshChangesSearchEmailFailure(this.exception); - - @override - List get props => [exception]; + RefreshChangesSearchEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/delete_multiple_sending_email_state.dart b/lib/features/sending_queue/domain/state/delete_multiple_sending_email_state.dart index cd3db7f42..a561cf081 100644 --- a/lib/features/sending_queue/domain/state/delete_multiple_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/delete_multiple_sending_email_state.dart @@ -16,7 +16,4 @@ class DeleteMultipleSendingEmailSuccess extends UIState { class DeleteMultipleSendingEmailFailure extends FeatureFailure { DeleteMultipleSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/delete_sending_email_state.dart b/lib/features/sending_queue/domain/state/delete_sending_email_state.dart index bffb50b8d..e1018fb7f 100644 --- a/lib/features/sending_queue/domain/state/delete_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/delete_sending_email_state.dart @@ -6,8 +6,6 @@ class DeleteSendingEmailLoading extends UIState {} class DeleteSendingEmailSuccess extends UIState {} class DeleteSendingEmailFailure extends FeatureFailure { - DeleteSendingEmailFailure(dynamic exception) : super(exception: exception); - @override - List get props => [exception]; + DeleteSendingEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/get_all_sending_email_state.dart b/lib/features/sending_queue/domain/state/get_all_sending_email_state.dart index d8787d87d..6acbbdc83 100644 --- a/lib/features/sending_queue/domain/state/get_all_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/get_all_sending_email_state.dart @@ -18,7 +18,4 @@ class GetAllSendingEmailSuccess extends UIState { class GetAllSendingEmailFailure extends FeatureFailure { GetAllSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/get_stored_sending_email_state.dart b/lib/features/sending_queue/domain/state/get_stored_sending_email_state.dart index 3e1eaacfc..e327ef1bc 100644 --- a/lib/features/sending_queue/domain/state/get_stored_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/get_stored_sending_email_state.dart @@ -34,7 +34,4 @@ class GetStoredSendingEmailSuccess extends UIState { class GetStoredSendingEmailFailure extends FeatureFailure { GetStoredSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/store_sending_email_state.dart b/lib/features/sending_queue/domain/state/store_sending_email_state.dart index 281bd5987..4d8b82287 100644 --- a/lib/features/sending_queue/domain/state/store_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/store_sending_email_state.dart @@ -16,8 +16,6 @@ class StoreSendingEmailSuccess extends UIState { } class StoreSendingEmailFailure extends FeatureFailure { - StoreSendingEmailFailure(dynamic exception) : super(exception: exception); - @override - List get props => [exception]; + StoreSendingEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/update_multiple_sending_email_state.dart b/lib/features/sending_queue/domain/state/update_multiple_sending_email_state.dart index d4d383917..af8a57018 100644 --- a/lib/features/sending_queue/domain/state/update_multiple_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/update_multiple_sending_email_state.dart @@ -26,15 +26,9 @@ class UpdateMultipleSendingEmailHasSomeSuccess extends UIState { class UpdateMultipleSendingEmailAllFailure extends FeatureFailure { UpdateMultipleSendingEmailAllFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } class UpdateMultipleSendingEmailFailure extends FeatureFailure { UpdateMultipleSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/sending_queue/domain/state/update_sending_email_state.dart b/lib/features/sending_queue/domain/state/update_sending_email_state.dart index eda76db5c..96eb5aaf6 100644 --- a/lib/features/sending_queue/domain/state/update_sending_email_state.dart +++ b/lib/features/sending_queue/domain/state/update_sending_email_state.dart @@ -17,7 +17,4 @@ class UpdateSendingEmailSuccess extends UIState { class UpdateSendingEmailFailure extends FeatureFailure { UpdateSendingEmailFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/session/domain/state/get_session_state.dart b/lib/features/session/domain/state/get_session_state.dart index f490a6a5d..180552ed9 100644 --- a/lib/features/session/domain/state/get_session_state.dart +++ b/lib/features/session/domain/state/get_session_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/session/session.dart'; class GetSessionLoading extends UIState {} @@ -15,7 +16,4 @@ class GetSessionSuccess extends UIState { class GetSessionFailure extends FeatureFailure { GetSessionFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/session/domain/state/get_stored_session_state.dart b/lib/features/session/domain/state/get_stored_session_state.dart index 84d3a73b0..6d3597094 100644 --- a/lib/features/session/domain/state/get_stored_session_state.dart +++ b/lib/features/session/domain/state/get_stored_session_state.dart @@ -17,7 +17,4 @@ class GetStoredSessionSuccess extends UIState { class GetStoredSessionFailure extends FeatureFailure { GetStoredSessionFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/session/domain/state/store_session_state.dart b/lib/features/session/domain/state/store_session_state.dart index 3f074313e..bb1a732a1 100644 --- a/lib/features/session/domain/state/store_session_state.dart +++ b/lib/features/session/domain/state/store_session_state.dart @@ -8,7 +8,4 @@ class StoreSessionSuccess extends UIState {} class StoreSessionFailure extends FeatureFailure { StoreSessionFailure(dynamic exception) : super(exception: exception); - - @override - List get props => [exception]; } \ No newline at end of file diff --git a/lib/features/thread/domain/state/empty_trash_folder_state.dart b/lib/features/thread/domain/state/empty_trash_folder_state.dart index 33af68601..1d826af13 100644 --- a/lib/features/thread/domain/state/empty_trash_folder_state.dart +++ b/lib/features/thread/domain/state/empty_trash_folder_state.dart @@ -1,4 +1,4 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; @@ -8,16 +8,9 @@ class EmptyTrashFolderSuccess extends UIActionState { jmap.State? currentEmailState, jmap.State? currentMailboxState, }) : super(currentEmailState, currentMailboxState); - - @override - List get props => []; } class EmptyTrashFolderFailure extends FeatureFailure { - final dynamic exception; - EmptyTrashFolderFailure(this.exception); - - @override - List get props => [exception]; + EmptyTrashFolderFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/get_all_email_state.dart b/lib/features/thread/domain/state/get_all_email_state.dart index de00ead0d..9ff0cd6be 100644 --- a/lib/features/thread/domain/state/get_all_email_state.dart +++ b/lib/features/thread/domain/state/get_all_email_state.dart @@ -1,6 +1,7 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart'; -import 'package:model/model.dart'; +import 'package:model/email/presentation_email.dart'; class GetAllEmailSuccess extends UIState { final List emailList; @@ -13,10 +14,6 @@ class GetAllEmailSuccess extends UIState { } class GetAllEmailFailure extends FeatureFailure { - final dynamic exception; - GetAllEmailFailure(this.exception); - - @override - List get props => [exception]; + GetAllEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/get_email_by_id_state.dart b/lib/features/thread/domain/state/get_email_by_id_state.dart index 3b3b8996e..4d7570b3f 100644 --- a/lib/features/thread/domain/state/get_email_by_id_state.dart +++ b/lib/features/thread/domain/state/get_email_by_id_state.dart @@ -14,10 +14,6 @@ class GetEmailByIdSuccess extends UIState { } class GetEmailByIdFailure extends FeatureFailure { - final dynamic exception; - GetEmailByIdFailure(this.exception); - - @override - List get props => [exception]; + GetEmailByIdFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/load_more_emails_state.dart b/lib/features/thread/domain/state/load_more_emails_state.dart index 9fd03d838..0255f1a75 100644 --- a/lib/features/thread/domain/state/load_more_emails_state.dart +++ b/lib/features/thread/domain/state/load_more_emails_state.dart @@ -1,5 +1,6 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/email/presentation_email.dart'; class LoadMoreEmailsSuccess extends UIState { final List emailList; @@ -11,10 +12,6 @@ class LoadMoreEmailsSuccess extends UIState { } class LoadMoreEmailsFailure extends FeatureFailure { - final dynamic exception; - LoadMoreEmailsFailure(this.exception); - - @override - List get props => [exception]; + LoadMoreEmailsFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/mark_as_multiple_email_read_state.dart b/lib/features/thread/domain/state/mark_as_multiple_email_read_state.dart index 1ab1fa597..1c67a8212 100644 --- a/lib/features/thread/domain/state/mark_as_multiple_email_read_state.dart +++ b/lib/features/thread/domain/state/mark_as_multiple_email_read_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:model/email/read_actions.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; @@ -19,7 +20,7 @@ class MarkAsMultipleEmailReadAllSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [countMarkAsReadSuccess, readActions]; + List get props => [countMarkAsReadSuccess, readActions, ...super.props]; } class MarkAsMultipleEmailReadAllFailure extends FeatureFailure { @@ -45,15 +46,14 @@ class MarkAsMultipleEmailReadHasSomeEmailFailure extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [countMarkAsReadSuccess, readActions]; + List get props => [countMarkAsReadSuccess, readActions, ...super.props]; } class MarkAsMultipleEmailReadFailure extends FeatureFailure { - final dynamic exception; final ReadActions readActions; - MarkAsMultipleEmailReadFailure(this.exception, this.readActions); + MarkAsMultipleEmailReadFailure(this.readActions, dynamic exception) : super(exception: exception); @override - List get props => [exception, readActions]; + List get props => [readActions, exception]; } \ No newline at end of file diff --git a/lib/features/thread/domain/state/mark_as_star_multiple_email_state.dart b/lib/features/thread/domain/state/mark_as_star_multiple_email_state.dart index 48a2ae2d5..a284194f2 100644 --- a/lib/features/thread/domain/state/mark_as_star_multiple_email_state.dart +++ b/lib/features/thread/domain/state/mark_as_star_multiple_email_state.dart @@ -1,6 +1,7 @@ -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; +import 'package:model/email/mark_star_action.dart'; import 'package:tmail_ui_user/features/base/state/ui_action_state.dart'; class LoadingMarkAsStarMultipleEmailAll extends UIState {} @@ -19,7 +20,7 @@ class MarkAsStarMultipleEmailAllSuccess extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [countMarkStarSuccess, markStarAction]; + List get props => [countMarkStarSuccess, markStarAction, ...super.props]; } class MarkAsStarMultipleEmailAllFailure extends FeatureFailure { @@ -45,15 +46,14 @@ class MarkAsStarMultipleEmailHasSomeEmailFailure extends UIActionState { ) : super(currentEmailState, currentMailboxState); @override - List get props => [countMarkStarSuccess, markStarAction]; + List get props => [countMarkStarSuccess, markStarAction, ...super.props]; } class MarkAsStarMultipleEmailFailure extends FeatureFailure { - final dynamic exception; final MarkStarAction markStarAction; - MarkAsStarMultipleEmailFailure(this.exception, this.markStarAction); + MarkAsStarMultipleEmailFailure(this.markStarAction, dynamic exception) : super(exception: exception); @override - List get props => [exception, markStarAction]; + List get props => [markStarAction, exception]; } \ No newline at end of file diff --git a/lib/features/thread/domain/state/move_multiple_email_to_mailbox_state.dart b/lib/features/thread/domain/state/move_multiple_email_to_mailbox_state.dart index 53efae282..283bdc464 100644 --- a/lib/features/thread/domain/state/move_multiple_email_to_mailbox_state.dart +++ b/lib/features/thread/domain/state/move_multiple_email_to_mailbox_state.dart @@ -1,4 +1,5 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/mail/email/email.dart'; import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart'; @@ -36,7 +37,8 @@ class MoveMultipleEmailToMailboxAllSuccess extends UIActionState { destinationMailboxId, moveAction, emailActionType, - destinationPath + destinationPath, + ...super.props ]; } @@ -78,17 +80,17 @@ class MoveMultipleEmailToMailboxHasSomeEmailFailure extends UIActionState { destinationMailboxId, moveAction, emailActionType, - destinationPath + destinationPath, + ...super.props ]; } class MoveMultipleEmailToMailboxFailure extends FeatureFailure { - final dynamic exception; final MoveAction moveAction; final EmailActionType emailActionType; - MoveMultipleEmailToMailboxFailure(this.exception, this.emailActionType, this.moveAction); + MoveMultipleEmailToMailboxFailure(this.emailActionType, this.moveAction, dynamic exception) : super(exception: exception); @override - List get props => [exception, emailActionType, moveAction]; + List get props => [emailActionType, moveAction, exception]; } \ No newline at end of file diff --git a/lib/features/thread/domain/state/refresh_changes_all_email_state.dart b/lib/features/thread/domain/state/refresh_changes_all_email_state.dart index 11441f20f..5ba4d02cf 100644 --- a/lib/features/thread/domain/state/refresh_changes_all_email_state.dart +++ b/lib/features/thread/domain/state/refresh_changes_all_email_state.dart @@ -1,6 +1,7 @@ -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:jmap_dart_client/jmap/core/state.dart'; -import 'package:model/model.dart'; +import 'package:model/email/presentation_email.dart'; class RefreshChangesAllEmailSuccess extends UIState { final List emailList; @@ -13,10 +14,6 @@ class RefreshChangesAllEmailSuccess extends UIState { } class RefreshChangesAllEmailFailure extends FeatureFailure { - final dynamic exception; - RefreshChangesAllEmailFailure(this.exception); - - @override - List get props => [exception]; + RefreshChangesAllEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/search_email_state.dart b/lib/features/thread/domain/state/search_email_state.dart index 42ba9fe1c..4a9e387f4 100644 --- a/lib/features/thread/domain/state/search_email_state.dart +++ b/lib/features/thread/domain/state/search_email_state.dart @@ -1,14 +1,8 @@ - -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:model/email/presentation_email.dart'; -class SearchingState extends UIState { - - SearchingState(); - - @override - List get props => []; -} +class SearchingState extends UIState {} class SearchEmailSuccess extends UIState { final List emailList; @@ -20,10 +14,6 @@ class SearchEmailSuccess extends UIState { } class SearchEmailFailure extends FeatureFailure { - final dynamic exception; - SearchEmailFailure(this.exception); - - @override - List get props => [exception]; + SearchEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/state/search_more_email_state.dart b/lib/features/thread/domain/state/search_more_email_state.dart index 06623da61..13e68f4d8 100644 --- a/lib/features/thread/domain/state/search_more_email_state.dart +++ b/lib/features/thread/domain/state/search_more_email_state.dart @@ -1,15 +1,8 @@ - -import 'package:core/core.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; import 'package:model/email/presentation_email.dart'; -class SearchingMoreState extends UIState { - - SearchingMoreState(); - - @override - List get props => []; -} - +class SearchingMoreState extends UIState {} class SearchMoreEmailSuccess extends UIState { final List emailList; @@ -21,10 +14,6 @@ class SearchMoreEmailSuccess extends UIState { } class SearchMoreEmailFailure extends FeatureFailure { - final dynamic exception; - SearchMoreEmailFailure(this.exception); - - @override - List get props => [exception]; + SearchMoreEmailFailure(dynamic exception) : super(exception: exception); } \ No newline at end of file diff --git a/lib/features/thread/domain/usecases/mark_as_multiple_email_read_interactor.dart b/lib/features/thread/domain/usecases/mark_as_multiple_email_read_interactor.dart index 3ce70c2fd..e99da0356 100644 --- a/lib/features/thread/domain/usecases/mark_as_multiple_email_read_interactor.dart +++ b/lib/features/thread/domain/usecases/mark_as_multiple_email_read_interactor.dart @@ -55,7 +55,7 @@ class MarkAsMultipleEmailReadInteractor { currentMailboxState: currentMailboxState)); } } catch (e) { - yield Left(MarkAsMultipleEmailReadFailure(e, readAction)); + yield Left(MarkAsMultipleEmailReadFailure(readAction, e)); } } } \ No newline at end of file diff --git a/lib/features/thread/domain/usecases/mark_as_star_multiple_email_interactor.dart b/lib/features/thread/domain/usecases/mark_as_star_multiple_email_interactor.dart index 704c5952a..27062847b 100644 --- a/lib/features/thread/domain/usecases/mark_as_star_multiple_email_interactor.dart +++ b/lib/features/thread/domain/usecases/mark_as_star_multiple_email_interactor.dart @@ -45,7 +45,7 @@ class MarkAsStarMultipleEmailInteractor { currentEmailState: currentEmailState)); } } catch (e) { - yield Left(MarkAsStarMultipleEmailFailure(e, markStarAction)); + yield Left(MarkAsStarMultipleEmailFailure(markStarAction, e)); } } } \ No newline at end of file diff --git a/lib/features/thread/domain/usecases/move_multiple_email_to_mailbox_interactor.dart b/lib/features/thread/domain/usecases/move_multiple_email_to_mailbox_interactor.dart index fdf6a52f7..0069c1b9e 100644 --- a/lib/features/thread/domain/usecases/move_multiple_email_to_mailbox_interactor.dart +++ b/lib/features/thread/domain/usecases/move_multiple_email_to_mailbox_interactor.dart @@ -59,7 +59,7 @@ class MoveMultipleEmailToMailboxInteractor { currentMailboxState: currentMailboxState)); } } catch (e) { - yield Left(MoveMultipleEmailToMailboxFailure(e, moveRequest.emailActionType, moveRequest.moveAction)); + yield Left(MoveMultipleEmailToMailboxFailure(moveRequest.emailActionType, moveRequest.moveAction, e)); } } } \ No newline at end of file diff --git a/lib/features/upload/domain/state/local_file_picker_state.dart b/lib/features/upload/domain/state/local_file_picker_state.dart index 0bbb92837..a2d948fe5 100644 --- a/lib/features/upload/domain/state/local_file_picker_state.dart +++ b/lib/features/upload/domain/state/local_file_picker_state.dart @@ -1,6 +1,6 @@ - -import 'package:core/core.dart'; -import 'package:model/model.dart'; +import 'package:core/presentation/state/failure.dart'; +import 'package:core/presentation/state/success.dart'; +import 'package:model/upload/file_info.dart'; class LocalFilePickerSuccess extends UIState { final List pickedFiles; @@ -12,15 +12,8 @@ class LocalFilePickerSuccess extends UIState { } class LocalFilePickerFailure extends FeatureFailure { - final dynamic exception; - LocalFilePickerFailure(this.exception); - - @override - List get props => [exception]; + LocalFilePickerFailure(dynamic exception) : super(exception: exception); } -class LocalFilePickerCancel extends FeatureFailure { - @override - List get props => []; -} \ No newline at end of file +class LocalFilePickerCancel extends FeatureFailure {} \ No newline at end of file