new project stable version

This commit is contained in:
2026-05-10 19:11:31 +03:00
commit 3616f84556
391 changed files with 23857 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import 'package:be_happy/domain/entities/payment_card.dart';
import '../../domain/entities/scooter_order.dart';
enum PaymentConfirmStatus { initial, loading, success, failure }
class PaymentConfirmState {
final PaymentConfirmStatus status;
final PaymentCard? selectedCard;
final String? errorMessage;
final bool paymentCompleted;
final ScooterOrder? order;
final bool useBalance;
final int userBalance;
const PaymentConfirmState({
this.status = PaymentConfirmStatus.initial,
this.errorMessage,
this.selectedCard,
this.paymentCompleted = false,
this.order,
this.useBalance = false,
this.userBalance = 0,
});
PaymentConfirmState copyWith({
PaymentConfirmStatus? status,
String? errorMessage,
PaymentCard? selectedCard,
bool? paymentCompleted,
ScooterOrder? order,
bool? useBalance,
int? userBalance,
}) {
return PaymentConfirmState(
status: status ?? this.status,
errorMessage: errorMessage ?? this.errorMessage,
selectedCard: selectedCard ?? this.selectedCard,
paymentCompleted: paymentCompleted ?? this.paymentCompleted,
order: order ?? this.order,
useBalance: useBalance ?? this.useBalance,
userBalance: userBalance ?? this.userBalance,
);
}
}