Skip to content
On this page

Form

A shared container for form controls, validation, and submission.

FormControl in FluttyUIFormControl in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

FormControl

FormControl({
  super.key,
  required FormFieldBuilder<T> builder,
  super.initialValue,
  super.validator,
  super.onSaved,
  super.enabled,
  super.autovalidateMode,
  super.forceErrorText,
  this.showError = true,
  this.validateOnBlur = true,
  this.revalidateOnChange = true,
  Widget Function(BuildContext context, String error)? errorBuilder,
});
ParameterTypeRequiredDefault
keyKey?Nonull
builderFormFieldBuilder<T>Yes—
initialValueInheritedNoInherited
validatorInheritedNoInherited
onSavedInheritedNoInherited
enabledInheritedNoInherited
autovalidateModeInheritedNoInherited
forceErrorTextInheritedNoInherited
showErrorboolNotrue
validateOnBlurboolNotrue
revalidateOnChangeboolNotrue
errorBuilderWidget Function(BuildContext context, String error)?Nonull

FluttyUI re-exports Flutter’s widgets-layer Form and FormField primitives. FormControl<T>, documented above, adds shared validation behavior. Wrap controls in Form and use a GlobalKey<FormState> to validate or save.

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/forms/form/form_control.dart

This reference is generated from the FormControl declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI