NashForm typedef

NashForm = Form

A smart form wrapper that manages validation state, loading state, and focus traversal automatically.

Form(
  onSubmit: (values) async {
    await api.login(values['email']!, values['password']!);
  },
  builder: (key, isLoading) => Column(
    children: [
      FormTextField(name: 'email', validators: [Validators.email()]),
      FormTextField(name: 'password', validators: [Validators.password()]),
      LoadingButton(label: 'Sign In', isLoading: isLoading, onPressed: () => key.currentState?.submit()),
    ],
  ),
)
A declarative, type-safe Form wrapper with automatic validation,
loading state management, and field value collection.

A backwards-compatible alias for [Form].

Implementation

typedef NashForm = Form;