DevTool for define custom stage host url and/or Proxy address in projects with Dio Using shared_preferences as persitent storage
dependencies:
dio_stage_host_selector:
git:
url: https://github.com/magdevelopment/DioStageHostSelector.git
ref: 3.0.0
- Initialize somewhere in main:
if (kDevBuild) {
await StageHostSelectorComponent.init(baseUrl);
}
- Put indicator widget somewhere on login page:
final widget = StageHostSelectorComponent.buildIndicator(context);
- When creating Dio, configure it by:
if (kDebugMode) {
StageHostSelectorComponent.configureDio(dio);
}