mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Flutter upgrade
This commit is contained in:
@@ -3,9 +3,9 @@ import 'package:cw_core/wallet_type.dart';
|
||||
|
||||
class WalletListItem {
|
||||
const WalletListItem(
|
||||
{@required this.name,
|
||||
@required this.type,
|
||||
@required this.key,
|
||||
{required this.name,
|
||||
required this.type,
|
||||
required this.key,
|
||||
this.isCurrent = false,
|
||||
this.isEnabled = true});
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ class WalletListViewModel = WalletListViewModelBase with _$WalletListViewModel;
|
||||
|
||||
abstract class WalletListViewModelBase with Store {
|
||||
WalletListViewModelBase(this._walletInfoSource, this._appStore,
|
||||
this._walletLoadingService) {
|
||||
wallets = ObservableList<WalletListItem>();
|
||||
this._walletLoadingService)
|
||||
: wallets = ObservableList<WalletListItem>() {
|
||||
_updateList();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ abstract class WalletListViewModelBase with Store {
|
||||
final Box<WalletInfo> _walletInfoSource;
|
||||
final WalletLoadingService _walletLoadingService;
|
||||
|
||||
WalletType get currentWalletType => _appStore.wallet.type;
|
||||
WalletType get currentWalletType => _appStore.wallet!.type;
|
||||
|
||||
@action
|
||||
Future<void> loadWallet(WalletListItem walletItem) async {
|
||||
@@ -51,8 +51,8 @@ abstract class WalletListViewModelBase with Store {
|
||||
name: info.name,
|
||||
type: info.type,
|
||||
key: info.key,
|
||||
isCurrent: info.name == _appStore.wallet.name &&
|
||||
info.type == _appStore.wallet.type,
|
||||
isCurrent: info.name == _appStore.wallet!.name &&
|
||||
info.type == _appStore.wallet!.type,
|
||||
isEnabled: availableWalletTypes.contains(info.type))));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user