network_kit_lite library

Classes

ApiBody
请求体注解 用于标记请求体参数
ApiCache
缓存策略注解
ApiDELETE
HTTP DELETE 请求注解
APIEndpoint
ApiGET
API 注解库 用于标记 API 接口方法,通过代码生成器自动生成 endpoint 类 HTTP GET 请求注解
ApiHeader
请求头注解 用于标记请求头参数
ApiModule
模块注解 用于标记 API 接口类,指定默认模块
ApiPATCH
HTTP PATCH 请求注解
ApiPath
路径参数注解 用于标记路径中的动态参数,如 /api/user/{id}
ApiPOST
HTTP POST 请求注解
ApiPUT
HTTP PUT 请求注解
ApiQuery
查询参数注解 用于标记查询参数
ApiResponseType
响应类型注解 用于指定响应数据的类型
ApiRetry
重试配置注解
ApiTimeout
超时配置注解
BaseResponse<T>
BaseWrapper
CacheManager
DioClient
DomainConfig
EndpointAnnotationProcessor
Endpoint 注解处理器 运行时根据注解动态创建 endpoint
EndpointApiBuilder
API 接口构建器 提供便捷的方法来创建 endpoint
EndpointConfig
Endpoint 配置
EndpointConfigCollection
Endpoint 配置集合
EndpointFactory
Endpoint 工厂 根据配置生成 Endpoint 实例
EndpointRegistry
Endpoint 注册表 管理所有配置化的 Endpoint
ErrorCodeIntl
错误码国际化工具类 现在使用 ARB 文件中的词条,通过回调函数来获取本地化消息
GenericAPIEndpoint<T>
HttpAuthTokenConfig
HttpConfig
网络配置(修改部分属性,extent HttpConfig重写方法,可以修改默认配置)
ListAPIEndpoint<T>
LocalizationHelper
简单的本地化工具类,用于第三方库
LoggingInterceptor
MonitoringInterceptor
网络监控拦截器
NetworkCallbacks<T>
网络请求回调处理器
NetworkCancelToken
网络取消令牌
NetworkConnectivity
网络连接检测工具类 使用 connectivity_plus 进行网络状态检测和监听
NetworkLogDatabase
网络日志数据库
NetworkLogEntry
网络请求日志条目
NetworkLogManager
网络日志管理器 负责存储、查询、过滤网络请求日志
NetworkMonitor
网络监控管理器
NetworkStats
网络请求统计信息
ProxyConfig
代理配置
RequestPerformance
单个请求的性能信息
ResponseHandler
ResponseWrapper<T>
返回数据包装器
RetryInterceptor
RetrySuggestion
重试建议
SmartRetryConfig
智能重试配置
TypeSafetyUtils
类型安全工具类

Enums

CachePolicy
缓存策略枚举
CacheType
EndpointResponseType
Endpoint 配置类型
HTTPContentType
HTTPMethod
NetworkConnectivityStatus
网络连接状态枚举
ProxyType
代理类型

Extensions

APIResponseExtension on APIEndpoint
API响应扩展,提供更简洁的请求和解析方式
AppExceptionExtensions on AppException
异常扩展,用于将异常转换为消息(Toast显示)
BaseResponseExtension on BaseResponse
BaseResponse 扩展方法
DioClientExtension on DioClient
为DioClient添加扩展方法,支持直接使用端点执行请求
DioExceptionExtensions on DioException
为DioException添加便捷方法
FutureBaseResponseExtension on Future<BaseResponse>
BaseResponse 扩展方法(用于 Future
FutureResponseWrapperExtension on Future<ResponseWrapper<T>>
Future<ResponseWrapper
HttpExceptionExtensions on Exception
HTTP异常扩展,用于提取服务端错误消息
ListSafetyExtensions on List<T>?
列表类型安全扩展
MapSafetyExtensions on Map<K, V>?
Map类型安全扩展
NetworkLogEntryExtension on NetworkLogEntry
NetworkLogEntry 扩展方法
NullableExtensions on T?
可空类型扩展
ProxyConfigExtension on ProxyConfig
ProxyConfig 扩展方法
ResponseWrapperExtension on ResponseWrapper<T>
ResponseWrapper 扩展方法(同步版本)
StringSafetyExtensions on String?
字符串类型安全扩展

Properties

dioClient DioClient
no setter

Typedefs

DataCreator<T> = T Function(dynamic json)

Exceptions / Errors

AppException
CustomException
自定义异常