import 'package:pshared/models/currency.dart'; import 'package:pshared/models/describable.dart'; import 'package:pshared/models/payment/chain_network.dart'; class Wallet implements Describable { final String id; final String walletUserID; // ID or number that we show the user final double balance; final Currency currency; final DateTime calculatedAt; final String? depositAddress; final ChainNetwork? network; final String? tokenSymbol; final String? contractAddress; final Describable describable; @override String get name => describable.name; @override String? get description => describable.description; Wallet({ required this.id, required this.walletUserID, required this.balance, required this.currency, required this.calculatedAt, required this.describable, this.depositAddress, this.network, this.tokenSymbol, this.contractAddress, }); Wallet copyWith({ Describable? describable, double? balance, }) => Wallet( id: id, balance: balance ?? this.balance, currency: currency, walletUserID: walletUserID, calculatedAt: calculatedAt, depositAddress: depositAddress, network: network, tokenSymbol: tokenSymbol, contractAddress: contractAddress, describable: describable ?? this.describable, ); }