FormUtil class
UI配置相关
Constructors
- FormUtil()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
Static Properties
- contentRatio ↔ double
-
右边内容区域比例
getter/setter pair
- rightArrowLeftPadding ↔ double
-
getter/setter pair
- rightArrowSize ↔ double
-
AutoLayout
getter/setter pair
- tipDescMaxWidth ↔ double
-
表单 tip 说明文字限制4个字长的最大宽度
getter/setter pair
Static Methods
-
buildErrorWidget(
String error, FormItemConfig themeData) → Widget - 获取错误提示widget
-
buildPrefixIcon(
String prefixIconType, bool isEdit, BuildContext context, VoidCallback? onAddTap, VoidCallback? onRemoveTap) → Widget - 获取添加、删除图标
-
buildRequireWidget(
bool isRequire) → Widget - 获取必填项
-
buildSubTitleWidget(
String? subTitle, FormItemConfig themeData) → Widget - 获取子标题Widget
-
buildTipLabelWidget(
String? tipLabel, VoidCallback? onTip, FormItemConfig themeData) → Widget - 获取问号
-
buildTitleWidget(
String title, FormItemConfig themeData) → Widget - 获取二级标题Widget
-
computeErrorEdgeInsets(
String type, bool isRequire) → EdgeInsets -
errorEdgeInsets(
FormItemConfig themeData) → EdgeInsets - error的右上间距
-
getAutoLayoutContentRatio(
{required bool tipLabelHidden, double? layoutRatio}) → double - 当左右内容超出默认比例且「有」提示语,则按比例 6:4 布局 当左右内容超出默认比例且「无」提示语,则按比例 4:6 布局 有用户自定义比例时用用户自定义比例
-
getErrorTextStyle(
FormItemConfig themeData) → TextStyle - 获取error 文本样式
-
getHeadTitleTextStyle(
FormItemConfig themeData, {bool isBold = false}) → TextStyle - 获取标题文本样式
-
getHintTextStyle(
FormItemConfig themeData, {double height = 0}) → TextStyle - 获取 右侧 输入、选择默认文本样式
-
getInputType(
String? type) → TextInputType -
getIsEditTextStyle(
FormItemConfig themeData, bool isEdit, {double height = 0}) → TextStyle - 获取是否可编辑的字体
-
getOptionSelectedTextStyle(
FormItemConfig themeData) → TextStyle - 获取选中选项文本样式
-
getOptionTextStyle(
FormItemConfig themeData) → TextStyle - 获取选项文本样式
-
getPrefixIcon(
String type) → Widget -
getPrefixIconWithDisable(
String type, bool isEnabled) → Widget -
getQuestionMarkIcon(
) → Image -
getRequireIcon(
bool isRequire) → Widget -
getRightArrowIcon(
) → Image - 视觉同学要求修改右箭头图标
-
getSubTitleTextStyle(
FormItemConfig themeData) → TextStyle - 获取左侧辅助样式
-
getTipsTextStyle(
FormItemConfig themeData) → TextStyle - 提示文本样式
-
getTitleTextStyle(
FormItemConfig themeData, {double height = 0}) → TextStyle - 获取标题文本样式
-
isEdit(
bool isEdit) → bool - 录入项是否可编辑
-
itemEdgeInsets(
FormItemConfig themeData) → EdgeInsets - 走主题配置 上下右间距
-
notifyAddRemoveTap(
BuildContext context, String prefixIconType, VoidCallback? onAddTap, VoidCallback? onRemoveTap) → void - 交互行为相关
-
notifyAddTap(
BuildContext context, VoidCallback? onAddTap) → void - 处理点击"添加/删除"按钮动作
-
notifyInputChanged(
ValueChanged< String> ? onTextChanged, String newStr) → void - 处理 输入状态 变化
-
notifyMultiChoiceStatusChanged(
OnBrnFormMultiChoiceValueChanged? onChoiceChanged, BuildContext context, List< String> oldVal, List<String> newVal) → void - 处理 多选选中状态变化
-
notifyRadioStatusChanged(
OnBrnFormRadioValueChanged? onTextChanged, BuildContext context, Object? oldVal, Object? newVal) → void - 处理 单选选中状态变化
-
notifyRemoveTap(
BuildContext context, VoidCallback? onRemoveTap) → void - 处理点击"添加/删除"按钮动作
-
notifySwitchChanged(
OnBrnFormSwitchChanged? onSwitchChanged, BuildContext context, bool oldValue, bool newValue) → void - 处理 开关 变化
-
notifyTap(
BuildContext context, VoidCallback? onWidgetTap) → void - 处理点击"按钮"动作
-
notifyValueChanged(
OnBrnFormValueChanged? onValueChanged, BuildContext context, int oldVal, int newVal) → void - 处理 数字值 变化
-
optionsMiddlePadding(
FormItemConfig themeData) → EdgeInsets? - 主题配置相关
-
subTitleEdgeInsets(
FormItemConfig themeData) → EdgeInsets - 子标题的右上间距
-
titleEdgeInsets(
String type, bool isRequire, FormItemConfig themeData) → EdgeInsets - 标题行的左间距
-
titleEdgeInsetsForHead(
bool isRequire, FormItemConfig themeData) → EdgeInsets - 标题行的左间距