SwitchFormItem constructor
SwitchFormItem({
- Key? key,
- String? label,
- String title = "",
- String? subTitle,
- String? tipLabel,
- String prefixIconType = PrefixIconType.normal,
- String error = "",
- bool isEdit = true,
- bool isRequire = true,
- VoidCallback? onAddTap,
- VoidCallback? onRemoveTap,
- VoidCallback? onTip,
- required bool value,
- OnBrnFormSwitchChanged? onChanged,
- Color? backgroundColor,
- FormItemConfig? themeData,
Implementation
SwitchFormItem({
Key? key,
this.label,
this.title = "",
this.subTitle,
this.tipLabel,
this.prefixIconType = PrefixIconType.normal,
this.error = "",
this.isEdit = true,
this.isRequire = true,
this.onAddTap,
this.onRemoveTap,
this.onTip,
required this.value,
this.onChanged,
this.backgroundColor,
this.themeData,
}) : super() {
themeData ??= FormItemConfig();
themeData = BaseThemeConfig.instance
.getConfig(configId: themeData!.configId)
.formItemConfig
.merge(themeData);
themeData =
themeData!.merge(FormItemConfig(backgroundColor: backgroundColor));
}