Config constructor
Config({
- String baseUrl = '',
- CreateHttpClient? createHttpClient,
- ValidateCertificate? badCertificateCallback,
- Duration connectTimeout = const Duration(seconds: 30),
- Duration receiveTimeout = const Duration(seconds: 30),
- String code = 'code',
- String data = 'data',
- String list = 'data/list',
- String message = 'message',
- String validCode = '0',
- String? errorTimeout = '网络请求超时',
- String? errorConnection = '网络连接出错,请检查网络连接',
- String? errorBadResponse = '服务器错误,请稍后重试',
- String? errorCancel = '请求被取消了',
- String? errorUnknown = '网络连接不稳定,请检查网络连接',
Implementation
Config(
{this.baseUrl = '',
this.createHttpClient,
this.badCertificateCallback,
this.connectTimeout = const Duration(seconds: 30),
this.receiveTimeout = const Duration(seconds: 30),
this.code = 'code',
this.data = 'data',
this.list = 'data/list',
this.message = 'message',
this.validCode = '0',
this.errorTimeout = '网络请求超时',
this.errorConnection = '网络连接出错,请检查网络连接',
this.errorBadResponse = '服务器错误,请稍后重试',
this.errorCancel = '请求被取消了',
this.errorUnknown = '网络连接不稳定,请检查网络连接'});