Connecting to a network
After you have installed Polkadart and generated the types, you can now connect to a network and start querying the chain.
Using Provider and the generated API
Let’s create a sample application together, inside bin/demo.dart
let’s add the following code:
Now you can run your application:
You should see the runtime version of the Polkadot chain.
You have now successfully connected to a Polkadot and made your first query to the chain! 🚀