IWalletConnectModalService class abstract

Implemented types
Implementers

Properties

address String?
The address of the currently connected account.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initError → dynamic
If the web3App fails to initialize and throws an exception, this will contain the caught exception. Otherwise, it will be null.
no setter
isConnected bool
Variable that can be used to check if the web3App is connected
no setter
isInitialized bool
Whether or not this object has been initialized.
no setter
isOpen bool
Variable that can be used to check if the modal is visible on screen.
no setter
projectId String
The project ID used to initialize the web3App.
no setter
requiredNamespaces Map<String, RequiredNamespace>
The required namespaces that will be used when connecting to the wallet
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session → SessionData?
The current session's data.
no setter
wcUri String?
The URI that can be used to connect to this dApp. This is only available after the open function is called.
no setter
web3App → IWeb3App?
The object that manages sessions, authentication, events, and requests for WalletConnect.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
close() → void
Closes the modal.
connectWallet({required WalletData walletData}) Future<void>
disconnect() Future<void>
Disconnects the session and pairing, if any. If there is no session, this does nothing.
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
getReferer() String
Sets the required namespaces that will be used when connecting to the wallet The default is set to the NamespaceConstants.ethereum namespace. Gets the name of the currently connected wallet.
init() Future<void>
The service used to fetch wallet listings from the explorer API. Sets up the explorer and the web3App if they already been initialized.
launchCurrentWallet() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
open({required BuildContext context, Widget? startWidget}) Future<void>
Opens the modal with the provided startState. If none is provided, the default state will be used based on platform.
rebuildConnectionUri() Future<void>
Rebuilds the connection URI. If the dapp attempts to connect to a wallet, and the connection proposal is consumed, but not accepted or rejected (no response), and they navigate back to the dapp and try again then no connection proposal will be sent. This is because the connection proposal is already consumed. So, every time they tap on a button to connect to a wallet, we need to rebuild the connection URI to ensure that each time they tap on a wallet, a new connection proposal is sent.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setDefaultChain({required Map<String, RequiredNamespace> requiredNamespaces}) → void
Sets the required namespaces that will be used when connecting to the wallet The default is set to the NamespaceConstants.ethereum namespace.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited