defaultPin static method

Widget defaultPin({
  1. required dynamic onChanged(
    1. String
    ),
  2. dynamic onCompleted(
    1. String
    )?,
  3. required int length,
  4. TextInputType keyboardType = TextInputType.number,
  5. bool obscureText = true,
  6. BorderRadius? borderRadius,
  7. Color? inactiveColor,
  8. Color? activeColor,
  9. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
  10. PinCodeFieldShape pinCodeFieldShape = PinCodeFieldShape.box,
})

Implementation

static Widget defaultPin({
  required Function(String) onChanged,
  Function(String)? onCompleted,
  required int length,
  TextInputType keyboardType = TextInputType.number,
  bool obscureText = true,
  BorderRadius? borderRadius,
  Color? inactiveColor,
  Color? activeColor,
  MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
  PinCodeFieldShape pinCodeFieldShape = PinCodeFieldShape.box,
}) {
  return PinCodeTextField(
    mainAxisAlignment: mainAxisAlignment,
    appContext: Get.context!,
    length: length,
    onChanged: onChanged,
    onCompleted: onCompleted,
    keyboardType: keyboardType,
    obscureText: obscureText,
    pinTheme: PinTheme(
      shape: pinCodeFieldShape,
      borderRadius: borderRadius,
      inactiveColor: inactiveColor,
      activeColor: activeColor,
    ),
  );
}