dd_js_util
library
Functions
-
asT<T extends Object?>(dynamic value, [T? defaultValue])
→ T?
-
-
customStampStr({int? timestamp, String? date, bool toInt = true})
→ String
-
-
delayFunction(DelayFetch call, [int? milliseconds])
→ void
-
延迟加载请求
一般在initState里面使用,执行初始化的一些操作
比如发起请求
-
ifCall(bool value, VoidCallback call)
→ void
-
-
isValue<T>(dynamic value)
→ T?
-
-
kLog(dynamic msg)
→ void
-
-
kLogErr(dynamic m)
→ void
-
-
logCurrentTime([String? msg])
→ void
-
-
nullCall<T>(T? value, void call(T value))
→ void
-
梁典典: 判空执行
如果
value
不为空,将会在call
函数中回调出去
可以省略null判断
-
showIosDialog(String msg, {String okText = 'Ok', List<Widget>? startActions, List<Widget>? endActions, Widget? title, String cancelText = 'Cancel', Widget? content})
→ void
-
-
showToast(String msg)
→ void
-
-
toast(String msg)
→ void
-
-
tryCatch(Function? f)
→ void
-
-
tryCoverList(String result, String paramsKey)
→ List
-
-
wtfLog(dynamic msg)
→ void
-
Typedefs
-
BaseApiDialogErrorHandle
= String Function(Object exception, Object errorStack)
-
-
BaseApiOption
= BaseOptions
-
-
BoolBuild
= bool Function()
-
-
BuildWidget
= Widget Function(BoxConstraints size, Widget child)
-
-
BuildWidgetFun
= Widget Function()
-
-
CacheBaseBoxHandle<E>
= Future<void> Function(Box<E> box)
-
-
CallIf
= bool Function()
-
-
CountDownBuilder
= Widget Function(BuildContext context, int day, int hour, int minute, int seconds, int millisecond)
-
-
CustomBuildThemeItems
= Widget Function(BuildContext context, List<CustomAppThemeData> themes)
-
-
CustomRecordWidget
= Widget Function(RecordState recordState)
-
自定义的小部件构建
recordState
- 组件状态回调,可以根据状态来显示不同的组件
-
CustomRenderBody
= Widget Function(List<PictureSelectionItemModel> images, PictureSelectionController controller, bool showAddButton)
-
自定义构建
-
CustomRenderWidget
= Widget Function(BuildContext context, List<Widget> child)
-
-
DelayFetch
= void Function()
-
-
FocusNodeWidgetBuilder
= Widget Function(FocusNode focusNode)
-
-
HiveUpdateModel<E>
= E Function(E? oldValue)
-
-
IfBuild
= Widget Function()
-
-
ImageItemRender
= Widget Function(BuildContext context, PictureSelectionItemModel file, Size size, dynamic onRemove(PictureSelectionItemModel file))
-
自定义渲染布局 (file)
-
ItemBuild
= Widget Function(BuildContext context, int index, bool isEmpty)
-
-
KeyboardActionsConfigBuilder
= KeyboardActionsConfig Function(KeyboardActionsConfig defaultConfig, FocusNode focusNode, BuildContext context)
-
-
LB
= BaseApiDialogBuilder
-
-
自定义选择菜单
imagePicker
- 用户选择了相册回调函数
cameraPicker
- 用户选择了拍摄回调函数
-
MyConstList<T>
= IListConst<T>
-
-
MyConstMap<K, V>
= IMapConst<K, V>
-
-
MyFormData
= FormData
-
-
MyHiveBox<T>
= Box<T>
-
-
MyIndicatorStatus
= IndicatorStatusModel
-
-
MyInterceptor
= Interceptor
-
-
MyInterceptorWrapper
= InterceptorsWrapper
-
-
MyList<T>
= IList<T>
-
-
MyListConfig<T>
= ListConfig<T>
-
-
MyLoadingModel<T>
= LoadingModel<T>
-
loading more 组件
-
MyLoadingMoreCustomScrollView
= LoadingMoreCustomScrollView
-
-
MyLoadingMoreList<T>
= LoadingMoreList<T>
-
-
MyLoadingMoreSliverList<T>
= LoadingMoreSliverList<T>
-
-
MyMap<K, V>
= IMap<K, V>
-
-
MyMultipartFile
= MultipartFile
-
-
MySliverListConfig<T>
= SliverListConfig<T>
-
-
MySliverWaterfallFlowDelegateWithFixedCrossAxisCount
= SliverWaterfallFlowDelegateWithFixedCrossAxisCount
-
-
MySwiper
= Swiper
-
-
MySwiperPluginIndexBuilder
= Widget Function(int current, int totalCount)
-
-
ParseObject
= BaseModel Function(Map<String, dynamic> originMap)
-
-
PictureSelectionRemoveFile
= Future<bool> Function(PictureSelectionItemModel file)
-
删除图片事件
bool - 返回true 表示删除成功,false为删除失败
-
PlaceholderBuilder
= Widget Function(Size size)
-
自定义占位布局小部件
也就是替换默认的+号小部件
size
- 组件宽高
-
R
= RequestParams
-
-
SearchSupportConfig<T>
= SliverListConfig<T>
-
-
SearchSupportItemBuilder<T>
= Widget Function(BuildContext context, T item, int index, bool isSelect)
-
-
SearchSupportRepository<T>
= LoadingMoreBase<T>
-
-
SearchSupportScrollView
= LoadingMoreCustomScrollView
-
-
SearchSupportSliverList<T>
= LoadingMoreSliverList<T>
-
-
SecondBuild
= Widget Function(int seconds)
-
-
SimpleListTileWidgetItemBuild<T>
= Widget Function(BuildContext context, T item)
-
-
TakeIfFun
= bool Function()
-
-
ThemeBuild
= Widget Function(AppLocalSettingModel theme)
-
-
ToastWrapper
= FlutterSmartDialog
-
-
ValueCopyWith<T>
= T Function(T value)
-
-
WidgetBuilder
= Widget Function()
-
-
WidgetRenderT<T>
= Widget Function(T value)
-