TxArrayFormField<T> constructor

TxArrayFormField<T>({
  1. required ArrayFormFieldBuilder<T> builder,
  2. ValueMapper<int, T>? defaultValue,
  3. ButtonStyle? addButtonStyle,
  4. ButtonStyle? actionsButtonStyle,
  5. int? limit,
  6. bool? sortable,
  7. bool? insertable,
  8. ArrayAddCallback<T>? onAddTap,
  9. Key? key,
  10. FormFieldSetter<List<T>>? onSaved,
  11. FormFieldValidator<List<T>>? validator,
  12. List<T>? initialValue,
  13. bool? enabled,
  14. AutovalidateMode? autovalidateMode = AutovalidateMode.onUserInteraction,
  15. String? restorationId,
  16. InputDecoration? decoration,
  17. ValueChanged<List<T>?>? onChanged,
  18. bool? required,
  19. bool? bordered,
  20. FocusNode? focusNode,
  21. String? hintText,
  22. TextAlign? textAlign,
  23. Widget? label,
  24. String? labelText,
  25. TextAlign? labelTextAlign,
  26. TextOverflow? labelOverflow,
  27. EdgeInsetsGeometry? padding,
  28. FieldActionsBuilder<List<T>>? actionsBuilder,
  29. TextStyle? labelStyle,
  30. double? horizontalGap,
  31. Color? tileColor,
  32. Axis? layoutDirection,
  33. TxFormFieldBuilder<List<T>>? trailingBuilder,
  34. Widget? leading,
  35. VisualDensity? visualDensity,
  36. ShapeBorder? shape,
  37. Color? iconColor,
  38. Color? textColor,
  39. TextStyle? leadingAndTrailingTextStyle,
  40. GestureTapCallback? onTap,
  41. double? minLeadingWidth,
  42. bool? dense,
  43. bool? colon,
  44. double? minLabelWidth,
  45. Color? focusColor,
  46. double? minVerticalPadding,
})

Implementation

TxArrayFormField({
  required ArrayFormFieldBuilder<T> builder,
  ValueMapper<int, T>? defaultValue,
  ButtonStyle? addButtonStyle,
  ButtonStyle? actionsButtonStyle,
  int? limit,
  bool? sortable,
  bool? insertable,
  ArrayAddCallback<T>? onAddTap,
  super.key,
  super.onSaved,
  FormFieldValidator<List<T>>? validator,
  super.initialValue,
  super.enabled,
  super.autovalidateMode,
  super.restorationId,
  super.decoration,
  super.onChanged,
  super.required,
  super.bordered,
  FocusNode? focusNode,
  String? hintText,
  TextAlign? textAlign,
  super.label,
  super.labelText,
  super.labelTextAlign,
  super.labelOverflow,
  super.padding,
  super.actionsBuilder,
  super.labelStyle,
  super.horizontalGap,
  super.tileColor,
  super.layoutDirection,
  super.trailingBuilder,
  super.leading,
  super.visualDensity,
  super.shape,
  super.iconColor,
  super.textColor,
  super.leadingAndTrailingTextStyle,
  super.onTap,
  super.minLeadingWidth,
  super.dense,
  super.colon,
  super.minLabelWidth,
  super.focusColor,
  super.minVerticalPadding,
})  : assert(onAddTap != null || defaultValue != null),
      super(
        builder: (field) => _buildFormField<T>(
          field,
          builder,
          defaultValue,
          addButtonStyle,
          actionsButtonStyle,
          limit,
          sortable,
          insertable,
          onAddTap,
        ),
        validator: (val) => _validator(val, required, limit, validator),
      );