fixedConfirmPasswordField method

TextFormField fixedConfirmPasswordField()

Implementation

TextFormField fixedConfirmPasswordField() {
  return TextFormField(
    key: const Key("confirm_password_input_field"),
    textInputAction: TextInputAction.done,
    obscureText: true,
    validator: (value) {
      if (value == null || value.length < 4) {
        return widget.langRequired;
      }
      if (value != passwordController.text) {
        return widget.langPasswordNotMatch;
      }
      return null;
    },
    controller: confirmPasswordController,
    decoration: InputDecoration(
      labelText: widget.langConfirmPassword,
      labelStyle: TextStyle(color: Theme.of(context).colorScheme.secondary),
      border: UnderlineInputBorder(
          borderSide: BorderSide(color: Theme.of(context).primaryColor)),
    ),
    keyboardType: TextInputType.visiblePassword,
  );
}