FormBuilderInput.switchInput constructor
FormBuilderInput.switchInput({InputDecoration decoration: const InputDecoration(), @required Widget label, @required String attribute, bool readonly: false, dynamic value, bool require: false, FormFieldValidator validator })
Implementation
FormBuilderInput.switchInput({
this.decoration = const InputDecoration(),
@required this.label,
@required this.attribute,
this.readonly = false,
this.value,
this.require = false,
this.validator,
}) : assert(value == null || value is bool,
"Initial value for a switch should be boolean") {
type = FormBuilderInput.TYPE_SWITCH;
}