InputField.password constructor

InputField.password({
  1. Key? key,
  2. TextEditingController? controller,
  3. String hintText = 'Password',
  4. ValueChanged<String>? onChanged,
  5. ValueChanged<String>? onSubmitted,
  6. String? errorText,
  7. bool enabled = true,
})

🔍 Named constructor

Implementation

factory InputField.password({
  Key? key,
  TextEditingController? controller,
  String hintText = 'Password',
  ValueChanged<String>? onChanged,
  ValueChanged<String>? onSubmitted,
  String? errorText,
  bool enabled = true,
}) {
  return InputField(
    key: key,
    controller: controller,
    hintText: hintText,
    obscureText: true,
    prefixIcon: Icons.lock_outline,
    keyboardType: TextInputType.visiblePassword,
    textInputAction: TextInputAction.done,
    onChanged: onChanged,
    onSubmitted: onSubmitted,
    errorText: errorText,
    enabled: enabled,
  );
}