dynamic-environment
A plugin for dynamically changing the base URL in requests
Getting Started
In order to show a dialog for changing the URL you need to call a requestDialog function. Optionally you can provide baseUrl to display it in dialogue.
requestDialog(
context,
baseUrl: 'https://example.com/',
);
The next step is to add DynamicEnvironmentInterceptor to the Dio instance.
dio.interceptors.add(DynamicEnvironmentInterceptor());