6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 3d286239
Changed files
.../lib/pregistration/bloc/preregistration_cubit.dart | 14 +++++++++----- .../lib/pregistration/bloc/preregistration_state.dart | 12 ++++++------ 2 files changed, 15 insertions(+), 11 deletions(-)
Diff
diff --git a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
index a294deed..8b4d8591 100644
--- a/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
+++ b/comwell_key_app/lib/pregistration/bloc/preregistration_cubit.dart
@@ -50,18 +50,18 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
void onContinueClicked() {
if (_isAnimating) return;
- String text = "generic_continue".tr();
+ String textStringId = "generic_continue";
switch (currentPage) {
case PreregistrationPage.information:
onInformationContinueClicked();
case PreregistrationPage.paymentMethod:
- text = "generic_confirm".tr();
+ textStringId = "generic_confirm";
onPaymentMethodsContinueClicked();
case PreregistrationPage.confirmation:
_onConfirmPressed();
break;
}
- emit(state.copyWith(buttonText: text));
+ emit(state.copyWith(buttonTextStringId: textStringId));
}
void onPaymentMethodsContinueClicked() {
@@ -76,7 +76,9 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
});
}
- void onEditProfileClicked() {}
+ void onEditProfileClicked() {
+ // Not implemented
+ }
void onEditAddressClicked() {
_navigateTo(PreregistrationPage.information);
@@ -86,7 +88,9 @@ class PreregistrationCubit extends Cubit<PreregistrationState> {
_navigateTo(PreregistrationPage.paymentMethod);
}
- void onEditExtrasClicked() {}
+ void onEditExtrasClicked() {
+ // Not implemented
+ }
void onBackClicked() {
if (_isAnimating) return;
diff --git a/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart b/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
index ed6a3f95..3b372bfb 100644
--- a/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
+++ b/comwell_key_app/lib/pregistration/bloc/preregistration_state.dart
@@ -8,13 +8,13 @@ class PreregistrationState extends Equatable {
final User? user;
final Exception? error;
final bool missingInformation;
- final String buttonText;
+ final String buttonTextStringId;
final int numOfExtras;
final int extrasTotalPrice;
final String paymentMethodName;
final String paymentMethodLastFourDigits;
- String get buttonTextLocalized => buttonText.tr();
+ String get buttonTextLocalized => buttonTextStringId.tr();
const PreregistrationState.initial()
: this(loading: true, missingInformation: false);
@@ -22,7 +22,7 @@ class PreregistrationState extends Equatable {
const PreregistrationState({
required this.loading,
required this.missingInformation,
- this.buttonText = "generic_continue",
+ this.buttonTextStringId = "generic_continue",
this.numOfExtras = 0,
this.extrasTotalPrice = 0,
this.paymentMethodName = "Name Name",
@@ -37,7 +37,7 @@ class PreregistrationState extends Equatable {
user,
error,
missingInformation,
- buttonText,
+ buttonTextStringId,
numOfExtras,
extrasTotalPrice,
paymentMethodName,
@@ -53,13 +53,13 @@ class PreregistrationState extends Equatable {
int? extrasTotalPrice,
String? paymentMethodName,
String? paymentMethodLastFourDigits,
- String? buttonText,
+ String? buttonTextStringId,
}) {
return PreregistrationState(
loading: loading ?? this.loading,
missingInformation: missingInformation ?? this.missingInformation,
user: user ?? this.user,
- buttonText: buttonText ?? this.buttonText,
+ buttonTextStringId: buttonTextStringId ?? this.buttonTextStringId,
numOfExtras: numOfExtras ?? this.numOfExtras,
extrasTotalPrice: extrasTotalPrice ?? this.extrasTotalPrice,
paymentMethodName: