basic_configuration.dart 845 Bytes
enum DevelopEvent {
  ///开发环境
  dev,
  ///测试环境
  test,
  ///正式环境
  formal
}

class BasicConfigurationManager {
  factory BasicConfigurationManager() => _getInstance();

  static BasicConfigurationManager? _instance;

  //服务器地址
  String? baseUrl;
  //SessionId
  String? sessionId;

  BasicConfigurationManager._internal(){
    DevelopEvent developType = DevelopEvent.dev;
    if (developType == DevelopEvent.test) {
      baseUrl = 'http://wow-app.dev.kouyuxingqiu.com';
    } else if(developType == DevelopEvent.dev) {
      baseUrl = 'http://wow-app.dev.kouyuxingqiu.com';
    } else {
      baseUrl = 'http://wow-app.dev.kouyuxingqiu.com';
    }
    sessionId = '';
  }

  static BasicConfigurationManager _getInstance() {
    _instance ??= BasicConfigurationManager._internal();
    return _instance!;
  }
}