Custom Networks
Custom Networks addition and selection
AppKit Flutter supports EVM and Solana networks by default since version 1.2.0, meaning that you can connect to these networks with no extra configuration and it already comes with a predefined list of chains within the ReownAppKitModalNetworks class.
This means that if you intend to support just EVM and Solana networks then no further adjustments are necessary.
However, with extra configuration to ReownAppKitModalNetworks
and optionalNamespaces
you can connect to whatever other network you’d like.
For instance, if you want to support also Polkadot blockchain then first add Polkadot to the supported networks list:
Remember to do this before ReownAppKitModal
instance configuration and to set isTestNetwork: true
if you are adding a testnet
Then modify/add optionalNamespaces:
property in ReownAppKitModal instance as follows:
When you set optionalNamespaces
property you are overwriting the internal definition of it so it is important that you also include eip155
and solana
in this case. If you plan to support only EVM + Solana then this extra step is not needed as mentioned before
ReownAppKitModalNetworks
class also comes with handy methods to change the configuration of the supported networks list:
- You can add more EVM networks
- You can remove Solana networks if you don’t want to support it
- You can remove test networks altogether
Configuration examples
A list of different ways of configure ReownAppKitModal()
instance to support different blockchains.