ttcomment library

Classes

AbsThemeColorConfig
AbsThemeImagePathConfig
AbstracRefreshMehod
刷新界面 触发方法
AbstracRefreshWidget
刷新界面 规范
AbstractAttribute
AbstractNetWork
AbstractWidget
AppBarGenerator
AppDio
BaseOptions
The common config for the Dio instance. dio.options is a instance of BaseOptions
BaseState
BaseVM
BtnItemWidget
CancelToken
You can cancel a request by using a cancel token. One token can be shared with different requests. when a token's cancel method invoked, all requests with this token will be cancelled.
CommentColorS
CommentTools
CommonBaseConfig
CommonBasePage
CommonErrorModel
CommonErrorPage
DefaultTransformer
Dimens
Dio
A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, File downloading etc. and Dio is very easy to use.
DioMixin
ErrorInterceptorHandler
Handler for error interceptor.
FontSizeResolvers
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
Gaps
Headers
HttpClient
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
HttpConfig
dio 配置项
HttpResponse
HttpTransformer
Response 解析
InheritRouteWidget
Interceptor
Dio instance may have interceptor(s) by which you can intercept requests/responses/errors before they are handled by then or catchError. See also:
Interceptors
Interceptors are a queue, and you can add any number of interceptors, All interceptors will be executed in first in first out order.
InterceptorsWrapper
InterceptorsWrapper is a helper class, which is used to conveniently create interceptor(s). See also:
ListParam<T>
Lock
Add lock/unlock API for interceptors.
LogInterceptor
LogInterceptor is used to print logs during network requests. It's better to add LogInterceptor to the tail of the interceptor queue, otherwise the changes made in the interceptor behind A will not be printed out. This is because the execution of interceptors is in the order of addition.
MultipartFile
A file to be uploaded as part of a MultipartRequest. This doesn't need to correspond to a physical file.
Options
Every request can pass an Options object which will be merged with Dio.options
QueuedInterceptor
Serialize the request/response/error before they enter the interceptor.
QueuedInterceptorsWrapper
QueuedInterceptorsWrapper is a helper class, which is used to conveniently create QueuedInterceptor(s). See also:
RebuildFactors
REdgeInsets
REdgeInsetsDirectional
RedirectRecord
RequestInterceptorHandler
Handler for request interceptor.
RequestOptions
Response<T>
Response describes the http Response info.
ResponseBody
ResponseInterceptorHandler
Handler for response interceptor.
RPadding
RSizedBox
ScreenUtil
ScreenUtilInit
SizeMacro
StringMacro
TextStyleMacor
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
TTNormalState<T extends TTNormalStatefulWidget>
TTNormalStatefulWidget
TTPopRoute<T>
TTStatelessWidget
WrapLayout

Enums

BtnlayoutType
DeviceType
DioErrorType
ListFormat
ListFormat specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name) and the separator for array items.
PageState
ResponseType
ResponseType indicates which transformation should be automatically applied to the response data by Dio.

Mixins

OptionsMixin
SU

Properties

appDarkThemeData ThemeData
final
appLightThemeData ThemeData
final

Functions

CreateNormalItemWidget({String? title, String? messge, bool? isshowline = false, dynamic ontap(int)?, MainAxisAlignment? mainAxisAlignment = MainAxisAlignment.spaceBetween, bool? isshownext = false, int type = 0, double height = 50, EdgeInsetsGeometry? padding = const EdgeInsets.only(left: 20), bool? istap = false, int? index = 0, Color? arrowrightColor = CommentColorS.col666666, Widget? leftwidget, Widget? rightwidget, Widget? arrowrightwidget, Widget? linewidget, BoxDecoration? decoration, Color? backgroundColor, BorderRadius? borderRadius}) Widget
CreateSureAndCannerBtnWidget({String? cannermsg, String? suremsg, Color? surebackgrounColor, Widget? sureWidget, Widget? cannerWidget, int btntype = 1, dynamic ontapsure()?, dynamic ontapcanner()?}) → dynamic
PopDialogWidget({required BuildContext context, String? title, Widget? titlewidget, Widget? msgwidget, String? msg, String? cannermsg, String? suremsg, Color? surebackgrounColor, Widget? sureWidget, Widget? cannerWidget, int btntype = 1, dynamic ontapsure()?, dynamic ontapcanner()?}) Widget
showPermissionpopup({required BuildContext context, String? title, String? msg, String? suremsg = "同意", String? cannermsg = "我不同意", int btntype = 1, Widget? titlewidget, Widget? msgwidget, bool barrierDismissible = true, Widget? child, Color? dialogBackColor, dynamic ontapsure()?, dynamic ontapcanner()?}) → dynamic

Typedefs

FontSizeResolver = double Function(num fontSize, ScreenUtil instance)
HeaderForEachCallback = void Function(String name, List<String> values)
InterceptorErrorCallback = void Function(DioError e, ErrorInterceptorHandler handler)
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
InterceptorSuccessCallback = void Function(Response e, ResponseInterceptorHandler handler)
JsonDecodeCallback = dynamic Function(String)
The default Transformer for Dio. If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the DefaultTransformer by setting the dio.Transformer.
ProgressCallback = void Function(int count, int total)
Callback to listen the progress for sending/receiving data.
RebuildFactor = bool Function(MediaQueryData old, MediaQueryData data)
RequestEncoder = List<int> Function(String request, RequestOptions options)
ResponseDecoder = String Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
ScreenUtilInitBuilder = Widget Function(BuildContext context, Widget? child)
ValidateStatus = bool Function(int? status)

Exceptions / Errors

BadRequestException
客户端请求错误
BadResponseException
BadServiceException
服务端响应错误
CancelException
DioError
DioError describes the error info when request failed.
HttpException
NetworkException
UnauthorisedException
401
UnknownException