export_ui
library
Functions
-
kdismissLoading()
→ void
-
取消loading
-
keditText({int? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? focusBorderColor, int? focusBorderWidth, int radius = 0, TextEditingController? editingController, TextStyle? textStyle, String? hint, TextStyle? hintStyle, Widget? leftIcon, Rx<bool>? isfocus, dynamic onChanged(String?)?, TextInputType? textInputType, bool isPassword = false})
→ Widget
-
输入框
height
高度
margin
外边距
padding
内边距
backgroundColor
背景色
focusBorderColor
获取焦点边框颜色
focusBorderWidth
边框宽度
radius
背景圆角
editingController
textStyle
输入文案样式
hint
提示文案
hintStyle
提示文案样式
leftIcon
左侧图片
isfocus
是否获取焦点
onChanged
内容变化监听
textInputType
输入类型
isPassword
是否秘密,现实还是隐藏输入内容
-
keditTextPwd({int? height, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Color? backgroundColor, Color? focusBorderColor, int? focusBorderWidth, int radius = 0, TextEditingController? editingController, TextStyle? textStyle, String? hint, TextStyle? hintStyle, Widget? leftIcon, Rx<bool>? isfocus, dynamic onChanged(String?)?, TextInputType? textInputType, Rx<bool>? showPassword, Color? eyeColors})
→ Widget
-
输入框-带显示和隐藏密码
height
高度
margin
外边距
padding
内边距
backgroundColor
背景色
focusBorderColor
获取焦点边框颜色
focusBorderWidth
边框宽度
radius
背景圆角
editingController
textStyle
输入文案样式
hint
提示文案
hintStyle
提示文案样式
leftIcon
左侧图片
isfocus
是否获取焦点
onChanged
内容变化监听
textInputType
输入类型
showPassword
是否显示秘密
eyeColors
密码图标颜色
-
kemptyView(Iterable? list, Widget child, String emptyText, {TextStyle? emptyTextStyle, String? emptyImagePath})
→ Widget
-
空页面
list
集合
emptyText
空页面显示文案
emptyImagePath
空页面显示的图片地址
-
kimage(bool isNet, String? url, int? width, int? height, {int? radius, String? errorPath, BoxFit fit = BoxFit.cover})
→ Widget
-
图片
isNet
是否网络图片
url
图片url或者本地图片路径path
width
图片宽度
height
图片高度
radius
图片圆角
errorPath
错误图片路径
fit
填充方式
-
kimageCircle(bool isNet, String? url, int width, int height, {String? errorPath})
→ Widget
-
圆形图片
isNet
是否网络图片
url
图片url或者本地图片路径path
width
图片宽度
height
图片高度
errorPath
错误图片路径
-
kimageText(String? imagePath, Widget text, ImageGravity gravity, {int marginImage = 0, int? imageWidth, int? imageHeight, int? textMaxWidth, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.center, bool isNetImage = false, Function? onTap})
→ Widget
-
图片+文字
-
krefresh(Widget child, AbsPageLogic logic, {bool enableRefresh = true, bool enableUp = true, })
→ Widget
-
下拉刷新和上拉加载
child
子控件
enableRefresh
是否启用下拉刷新
enableUp
是否启动上拉加载
-
krefreshBuilder(Widget child, AbsPageLogic logic, {bool enableRefresh = true, bool enableUp = true, })
→ Widget
-
下拉刷新和上拉加载
child
子控件
enableRefresh
是否启用下拉刷新
enableUp
是否启动上拉加载
-
kshowError(String? text, {int? seconds})
→ void
-
显示错误
seconds:显示时长,单位-秒
-
kshowInfo(String? text, {int? seconds})
→ void
-
显示提示
seconds:显示时长,单位-秒
-
kshowLoading({String? text, bool dismissOnTap = false, EasyLoadingMaskType maskType = EasyLoadingMaskType.black})
→ void
-
提示对话框
显示loading时,不允许用户交互
dismissOnTap:点击空白区域是否可以取消
maskType:背景遮罩颜色
-
kshowSuccess(String? text, {int? seconds})
→ void
-
显示成功
seconds:显示时长,单位-秒
-
ktoast(String? text, {EasyLoadingToastPosition position = EasyLoadingToastPosition.bottom, int? seconds})
→ void
-
显示toast