IWeb3ModalService class abstract

Implemented types
Implementers

Constructors

IWeb3ModalService()

Properties

address String?
The address of the currently connected account.
no setter
explorerService IExplorerService
The service used to fetch wallet listings from the explorer API.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
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.
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
Gets the name of the currently connected wallet.
init() Future<void>
The current connection state of the modal. Used by the connect button to render the correct UI. The current state of the modal. The list of wallets from the explorer API. Sets up the explorer and the web3App if they already been initialized.
launchCurrentWallet() → 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, Web3ModalState? startState}) Future<void>
Opens the modal with the provided startState. If none is provided, the default state will be used based on platform.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setDefaultChain({Web3ModalChains? web3modalChain, Map<String, RequiredNamespace>? requiredNamespaces}) → void
Sets the default chain to use for the session. web3modalChain or requiredNamespaces must be provided, if both are null this function will do nothing.
setRequiredNamespaces(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