Forms are used for submitting data so be as concise as possible when designing. Keep it short. Think about each field and what value the data will provide. What do you gain by collecting this information?
CForm( type: CFormType.blank, action: CButton( label: 'Action Button', onTap: () {}, icon: Icon(CIcons.add, size: 16), ), children: [ CTextField(label: 'Label', description: 'Description'), const SizedBox(height: 16), CTextField( label: 'Label', description: 'Description', validator: (value) { return CValidationResult( kind: CValidationKind.error, message: 'Your input is incorrect', ); }, ), ], );
Last updated 1 year ago
children
The content of the form.
Type: List<Widget>
List<Widget>
Default: required
enable
Whether the form is enabled or not.
Type: bool
bool
Default: true
true
type
The type of the form. It can be group, blank.
group, blank
Type: CFormType
CFormType
Default: CFormType.blank
CFormType.blank
action
An action widget to display at the end of the form.
Type: Widget?
Widget?
Default: optional