create method

NyForm create({
  1. Map<String, dynamic>? initialData,
  2. double? crossAxisSpacing,
  3. double? mainAxisSpacing,
  4. dynamic onChanged(
    1. String field,
    2. Map<String, dynamic> data
    )?,
  5. bool? validateOnFocusChange,
  6. bool? locked,
})

Create a new form initialData The initial data for the form crossAxisSpacing The cross axis spacing for the form mainAxisSpacing The main axis spacing for the form onChanged The onChanged function for the form validateOnFocusChange Validate on focus change locked Lock the form

Implementation

NyForm create(
    {Map<String, dynamic>? initialData,
    double? crossAxisSpacing,
    double? mainAxisSpacing,
    Function(String field, Map<String, dynamic> data)? onChanged,
    bool? validateOnFocusChange,
    bool? locked}) {
  return NyForm(
      form: this,
      crossAxisSpacing: crossAxisSpacing ?? 10,
      mainAxisSpacing: mainAxisSpacing ?? 10,
      initialData: initialData,
      onChanged: onChanged,
      validateOnFocusChange: validateOnFocusChange ?? false,
      locked: locked ?? false);
}