FlutstrapFormGroup constructor
const
FlutstrapFormGroup({
- Key? key,
- required List<
Widget> children, - String? label,
- String? helperText,
- String? validationMessage,
- bool showValidation = false,
- bool isValid = true,
- bool required = false,
- FSFormGroupLayout layout = FSFormGroupLayout.vertical,
- FSFormGroupSize size = FSFormGroupSize.md,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- double spacing = 16.0,
- bool showLabel = true,
- Widget? customLabel,
- FSFormGroupState state = FSFormGroupState.valid,
Implementation
const FlutstrapFormGroup({
super.key,
required this.children,
this.label,
this.helperText,
this.validationMessage,
this.showValidation = false,
this.isValid = true,
this.required = false,
this.layout = FSFormGroupLayout.vertical,
this.size = FSFormGroupSize.md,
this.crossAxisAlignment = CrossAxisAlignment.start,
this.mainAxisAlignment = MainAxisAlignment.start,
this.spacing = 16.0,
this.showLabel = true,
this.customLabel,
this.state = FSFormGroupState.valid,
}) :
// ✅ FIXED: Only use compile-time constants in constructor
assert(spacing >= 0, 'Spacing must be non-negative');