new project stable version
This commit is contained in:
40
lib/presentation/state/top_up_state.dart
Normal file
40
lib/presentation/state/top_up_state.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:be_happy/domain/entities/certificate.dart';
|
||||
import 'package:be_happy/domain/entities/payment_card.dart';
|
||||
|
||||
import '../../domain/entities/top_up_tariff.dart';
|
||||
|
||||
class TopUpState {
|
||||
final List<Certificate> certificates;
|
||||
final List<PaymentCard> cards;
|
||||
final Certificate? selectedTariff;
|
||||
final PaymentCard? selectedCard;
|
||||
final bool isLoading;
|
||||
final bool isAgreed;
|
||||
|
||||
TopUpState({
|
||||
this.certificates = const [],
|
||||
this.cards = const [],
|
||||
this.selectedTariff,
|
||||
this.selectedCard,
|
||||
this.isLoading = false,
|
||||
this.isAgreed = false,
|
||||
});
|
||||
|
||||
TopUpState copyWith({
|
||||
List<Certificate>? certificates,
|
||||
List<PaymentCard>? cards,
|
||||
Certificate? selectedTariff,
|
||||
PaymentCard? selectedCard,
|
||||
bool? isLoading,
|
||||
bool? isAgreed,
|
||||
}) {
|
||||
return TopUpState(
|
||||
certificates: certificates ?? this.certificates,
|
||||
cards: cards ?? this.cards,
|
||||
selectedTariff: selectedTariff ?? this.selectedTariff,
|
||||
selectedCard: selectedCard ?? this.selectedCard,
|
||||
isLoading: isLoading ?? this.isLoading,
|
||||
isAgreed: isAgreed ?? this.isAgreed,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user