Skip to content

Commit af50b50

Browse files
committed
refactor(app_configuration): rename clearErrorMessage to clearException
- Renamed `clearErrorMessage` to `clearException` - Updated state and bloc to reflect the change
1 parent bd139e4 commit af50b50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/app_configuration/bloc/app_configuration_bloc.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class AppConfigurationBloc
100100
state.copyWith(
101101
remoteConfig: event.remoteConfig,
102102
isDirty: true,
103-
clearErrorMessage: true, // Clear any previous error messages
103+
clearException: true, // Clear any previous error messages
104104
clearShowSaveSuccess: true, // Clear success snackbar on field change
105105
),
106106
);
@@ -114,7 +114,7 @@ class AppConfigurationBloc
114114
state.copyWith(
115115
remoteConfig: state.originalRemoteConfig, // Revert to original config
116116
isDirty: false,
117-
clearErrorMessage: true, // Clear any previous error messages
117+
clearException: true, // Clear any previous error messages
118118
clearShowSaveSuccess: true, // Clear success snackbar
119119
),
120120
);

lib/app_configuration/bloc/app_configuration_state.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ class AppConfigurationState extends Equatable {
5454
RemoteConfig? originalRemoteConfig,
5555
HtHttpException? exception,
5656
bool? isDirty,
57-
bool clearErrorMessage = false,
57+
bool clearException = false,
5858
bool? showSaveSuccess,
5959
bool clearShowSaveSuccess = false,
6060
}) {
6161
return AppConfigurationState(
6262
status: status ?? this.status,
6363
remoteConfig: remoteConfig ?? this.remoteConfig,
6464
originalRemoteConfig: originalRemoteConfig ?? this.originalRemoteConfig,
65-
exception: clearErrorMessage ? null : exception ?? this.exception,
65+
exception: clearException ? null : exception ?? this.exception,
6666
isDirty: isDirty ?? this.isDirty,
6767
showSaveSuccess: clearShowSaveSuccess
6868
? false

0 commit comments

Comments
 (0)