SmartConfig class

SmartDio 全局配置(不可变)

Constructors

SmartConfig({required BaseOptions options, List<SmartPlugin> globalPlugins = const [], SmartErrorLocalizer? errorLocalizer})
const
SmartConfig.simple({required String baseUrl, Duration connectTimeout = const Duration(seconds: 30), Duration receiveTimeout = const Duration(seconds: 30), Duration sendTimeout = const Duration(seconds: 30), Map<String, dynamic>? headers, List<SmartPlugin> globalPlugins = const [], SmartErrorLocalizer? errorLocalizer})
创建一个带默认值的简化配置
factory

Properties

errorLocalizer SmartErrorLocalizer?
错误消息本地化器
final
globalPlugins List<SmartPlugin>
全局插件列表
final
hashCode int
The hash code for this object.
no setterinherited
options BaseOptions
Dio 基础选项
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited