SwitchFormItem constructor

SwitchFormItem({
  1. Key? key,
  2. String? label,
  3. String title = "",
  4. String? subTitle,
  5. String? tipLabel,
  6. String prefixIconType = PrefixIconType.normal,
  7. String error = "",
  8. bool isEdit = true,
  9. bool isRequire = true,
  10. VoidCallback? onAddTap,
  11. VoidCallback? onRemoveTap,
  12. VoidCallback? onTip,
  13. required bool value,
  14. OnBrnFormSwitchChanged? onChanged,
  15. Color? backgroundColor,
  16. 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));
}