1

I am having a flutter project where I have written code for Ethereum transfer. The problem is it is only working for static rpc URL like I have given IP address of my wifi.

I am new to ganache, and I can't find any way in which I can deploy that project and need not use the static URL.

String rpcUrl = "http://192.168.0.103:7545";

Here instead of static IP 192.168.0.103, I want some URL that is deployed so I can access this workspace if it's not in this IP 192.168.0.103 too.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Harsh Bhalala
  • 173
  • 1
  • 2
  • 9

1 Answers1

0

If you need that variable to be accessed from the app, you can create a TextField, which will accept the IP adress from user, and then connect to specified network.

Other solution - is to use fifferent variables for different environments (say dev/master), and specify the set of variables on the stage of app build. So that master version of your app is built with proper variables.

dancheg
  • 549
  • 1
  • 4
  • 14