Files
be_happy_public/lib/presentation/state/promo_code_state.dart
Polyanka 182be1049b some fix
# Conflicts:
#	lib/presentation/navigation/app_router.dart
#	pubspec.yaml
2026-08-11 00:23:16 +03:00

25 lines
612 B
Dart

enum PromoCodeStatus { initial, loading, success, failure }
class PromoCodeState {
final PromoCodeStatus status;
final double? newBalance;
final String? errorMessage;
const PromoCodeState({
this.status = PromoCodeStatus.initial,
this.newBalance,
this.errorMessage,
});
PromoCodeState copyWith({
PromoCodeStatus? status,
double? newBalance,
String? errorMessage,
}) {
return PromoCodeState(
status: status ?? this.status,
newBalance: newBalance ?? this.newBalance,
errorMessage: errorMessage ?? this.errorMessage,
);
}
}