# Conflicts:
#	lib/presentation/navigation/app_router.dart
#	pubspec.yaml
This commit is contained in:
2026-08-11 00:14:00 +03:00
parent c9b8d143d1
commit 182be1049b
351 changed files with 24566 additions and 22898 deletions

View File

@@ -1,55 +1,55 @@
import 'package:be_happy/domain/entities/certificate.dart';
import 'package:be_happy/domain/entities/payment_card.dart';
sealed class TopUpState {
const TopUpState();
}
class TopUpLoading extends TopUpState {
const TopUpLoading();
}
class TopUpLoaded extends TopUpState {
final List<Certificate> certificates;
final List<PaymentCard> cards;
final Certificate? selectedTariff;
final PaymentCard? selectedCard;
final bool isAgreed;
final bool isProcessingPayment;
const TopUpLoaded({
this.certificates = const [],
this.cards = const [],
this.selectedTariff,
this.selectedCard,
this.isAgreed = false,
this.isProcessingPayment = false,
});
TopUpLoaded copyWith({
List<Certificate>? certificates,
List<PaymentCard>? cards,
Certificate? selectedTariff,
PaymentCard? selectedCard,
bool? isAgreed,
bool? isProcessingPayment,
}) {
return TopUpLoaded(
certificates: certificates ?? this.certificates,
cards: cards ?? this.cards,
selectedTariff: selectedTariff ?? this.selectedTariff,
selectedCard: selectedCard ?? this.selectedCard,
isAgreed: isAgreed ?? this.isAgreed,
isProcessingPayment: isProcessingPayment ?? this.isProcessingPayment,
);
}
}
class TopUpPaymentSuccess extends TopUpState {
const TopUpPaymentSuccess();
}
class TopUpPaymentFailure extends TopUpState {
final String errorMessage;
const TopUpPaymentFailure(this.errorMessage);
import 'package:be_happy/domain/entities/certificate.dart';
import 'package:be_happy/domain/entities/payment_card.dart';
sealed class TopUpState {
const TopUpState();
}
class TopUpLoading extends TopUpState {
const TopUpLoading();
}
class TopUpLoaded extends TopUpState {
final List<Certificate> certificates;
final List<PaymentCard> cards;
final Certificate? selectedTariff;
final PaymentCard? selectedCard;
final bool isAgreed;
final bool isProcessingPayment;
const TopUpLoaded({
this.certificates = const [],
this.cards = const [],
this.selectedTariff,
this.selectedCard,
this.isAgreed = false,
this.isProcessingPayment = false,
});
TopUpLoaded copyWith({
List<Certificate>? certificates,
List<PaymentCard>? cards,
Certificate? selectedTariff,
PaymentCard? selectedCard,
bool? isAgreed,
bool? isProcessingPayment,
}) {
return TopUpLoaded(
certificates: certificates ?? this.certificates,
cards: cards ?? this.cards,
selectedTariff: selectedTariff ?? this.selectedTariff,
selectedCard: selectedCard ?? this.selectedCard,
isAgreed: isAgreed ?? this.isAgreed,
isProcessingPayment: isProcessingPayment ?? this.isProcessingPayment,
);
}
}
class TopUpPaymentSuccess extends TopUpState {
const TopUpPaymentSuccess();
}
class TopUpPaymentFailure extends TopUpState {
final String errorMessage;
const TopUpPaymentFailure(this.errorMessage);
}