Skip to content

magdevelopment/DioStageHostSelector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DioStageHostSelector

DevTool for define custom stage host url and/or Proxy address in projects with Dio Using shared_preferences as persitent storage

Indicator

Dialog

How to install

dependencies:
  dio_stage_host_selector:
    git:
      url: https://github.com/magdevelopment/DioStageHostSelector.git
      ref: 3.0.0

How to use

  1. Initialize somewhere in main:
if (kDevBuild) {
   await StageHostSelectorComponent.init(baseUrl);
}
  1. Put indicator widget somewhere on login page:
final widget = StageHostSelectorComponent.buildIndicator(context);
  1. When creating Dio, configure it by:
if (kDebugMode) {
    StageHostSelectorComponent.configureDio(dio);
}