String Interpolated base url and end point not working on Flutter Web app
I have implemented a flutter web app and created develop and release environments. I am accessing the API Url like "${ConfigEnv.baseUrl}${MyEndPointFile.jokesEndPoint}", . The Config File looks like below: class ConfigEnv{ static String get fileName { if(kReleaseMode){ return '.env.production'; } return '.env.develop'; } static String get baseUrl{ return dotenv.env['API_URL'] ?? ''; } } When I run my web app locally in develop mode or release mode then the correct base urls are picked as written in .env file but when I host the web app to custom domain then the base url is getting replaced by
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.