I am configuring an API endpoint using the flutter package dio! I have two API endpoints: one for development and another for production. I want my dio baseURL to automatically switch between development and production endpoints.
Just like so
Dio(
baseURL: isProduction ? productionBaseURL : developmentBaseURL
......
);
How to know if my app is in production environment in Dart?