Methods
beforeStart (Keyring keyring , {KeyringEVM ? keyringEVM , WebViewRunner ? webView , String ? jsCode , Function ? socketDisconnectedAction , bool isEVM = false })
→ Future <void >
This method will be called while App switched to a plugin.
In this method, the plugin will init WalletSDK and start
a webView for running polkadot-js/api
.
changeAccount (KeyPairData account )
→ Future <void >
This method will be called while App user changes account.
dispose ()
→ Future <void >
we don't really need this method, calling webView.launch
more than once will cause some exception.
We just pass a webViewParam
instance to the sdk.init function,
so the sdk knows how to deal with the webView.
getAggregatedAssetsWidget ({String priceCurrency = 'USD' , bool hideBalance = false , double rate = 1.0 , Function ? onSwitchBack , Function ? onSwitchHideBalance })
→ Widget ?
The App will display this widget in assets page
getNativeTokenTransfers ({required String address , int transferType = 0 })
→ Widget ?
The App will display this widget in native token detail page
@paramtransferType
= 0 | 1 | 2, (0 = all, 1 = in, 2 = out)
getNavItems (BuildContext context , Keyring keyring )
→ List <HomeNavItem >
The getNavItems method returns a list of HomeNavItem which defines
the Widget to be used in home page of polkawallet App.
inherited
getRoutes (Keyring keyring )
→ Map <String , WidgetBuilder >
App will add plugin's pages with custom routes
.
inherited
loadBalances (KeyPairData acc )
→ void
loadJSCode ()
→ Future <String > ?
App will inject plugin's jsCode
into webview to connect.
inherited
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAccountChanged (KeyPairData account )
→ Future <void >
This method will be called while App user changes account.
In this method, the plugin should do:
onStarted (Keyring keyring )
→ Future <void >
This method will be called after plugin started
onStartedEVM (KeyringEVM keyringEvm )
→ Future <void >
This method will be called after plugin started
onWillStart (Keyring keyring )
→ Future <void >
This method will be called before plugin start
onWillStartEVM (KeyringEVM keyring )
→ Future <void >
start (Keyring keyring , {List <NetworkParams > ? nodes , KeyringEVM ? keyringEVM , NetworkParams ? nodeEVM })
→ Future <NetworkParams ? >
This method will be called while App switched to a plugin.
In this method, the plugin will:
toString ()
→ String
A string representation of this object.
inherited
updateBalances (KeyPairData acc )
→ Future <void >
This method will be called while user request to query balance.
updateNetworkState ()
→ Future <void >