walletState property

WalletState get walletState

The state the wallet currently is in.

This might change at any time, especially from WalletState.connected to WalletState.installed/WalletState.loadable since the user might just deauthorized your app using his wallet extension/close the wallet popup!

You can get notified if this value changes if you addListener on this object, BUT MAKE SURE to remove the listener using removeListener after you are done, OR YOU MIGHT ENCOUNTER PERFORMANCE ISSUES!

Implementation

WalletState get walletState {
  if (_connected) {
    return WalletState.connected;
  } else if (_connecting) {
    return WalletState.connecting;
  } else if (_disconnecting) {
    return WalletState.disconnecting;
  } else {
    return fromWalletReadyState(_readyState);
  }
}