import 'package:cw_core/address_info.dart'; import 'package:cw_core/wallet_info.dart'; abstract class WalletAddresses { WalletAddresses(this.walletInfo) : addressesMap = {}, addressInfos = {}; final WalletInfo walletInfo; String get address; set address(String address); Map addressesMap; Map> addressInfos; Set usedAddresses = {}; Future init(); Future updateAddressesInBox(); Future saveAddressesInBox() async { try { walletInfo.address = address; walletInfo.addresses = addressesMap; walletInfo.addressInfos = addressInfos; walletInfo.usedAddresses = usedAddresses.toList(); if (walletInfo.isInBox) { await walletInfo.save(); } } catch (e) { print(e.toString()); } } bool containsAddress(String address) => addressesMap.containsKey(address); dynamic addressPageType; Future setAddressType(dynamic type); }