buildForm method

FormGroup buildForm(
  1. ClosedHouseholdState state
)

Implementation

FormGroup buildForm(ClosedHouseholdState state) {
  return fb.group(<String, Object>{
    _administrationAreaKey: FormControl<String>(
      value: localizations
          .translate(ClosedHouseholdSingleton().boundary!.name.toString()),
      validators: [Validators.required],
    ),
    _householdHeadNameKey: FormControl<String>(
      value: null,
      validators: [
        Validators.delegate(
          CustomValidator.requiredMin,
        ),
        Validators.maxLength(200),
        Validators.minLength(2),
      ],
    ),
    _latKey: FormControl<double>(validators: []),
    _lngKey: FormControl<double>(),
    _accuracyKey: FormControl<double>(),
  });
}