From 46dfeccc4b8631a1dcf44d64ff3d7e80e4c176fe Mon Sep 17 00:00:00 2001 From: PrasadDhend <88186894+PrasadDhend@users.noreply.github.com> Date: Sat, 8 Apr 2023 12:34:01 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0b58b16..1d777c7 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ OTPTextField( fontSize: 17 ), textFieldAlignment: MainAxisAlignment.spaceAround, + textCapitalization: TextCapitalization.characters, fieldStyle: FieldStyle.underline, onCompleted: (pin) { print("Completed: " + pin); From 6e8a856980b7b4ef8fd620a75e5f5a96644ababe Mon Sep 17 00:00:00 2001 From: PrasadDhend <88186894+PrasadDhend@users.noreply.github.com> Date: Sat, 8 Apr 2023 12:37:37 +0530 Subject: [PATCH 2/2] Update otp_field.dart --- lib/otp_field.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/otp_field.dart b/lib/otp_field.dart index 279571d..6381e90 100644 --- a/lib/otp_field.dart +++ b/lib/otp_field.dart @@ -6,6 +6,9 @@ import 'package:otp_text_field/style.dart'; class OTPTextField extends StatefulWidget { /// TextField Controller final OtpFieldController? controller; + + /// TextCapitalization + final TextCapitalization? textCapitalization; /// Number of the OTP Fields final int length; @@ -69,6 +72,7 @@ class OTPTextField extends StatefulWidget { this.controller, this.fieldWidth = 30, this.spaceBetween = 0, + this.textCapitalization = TextCapitalization.none, this.otpFieldStyle, this.hasError = false, this.keyboardType = TextInputType.number, @@ -187,6 +191,7 @@ class _OTPTextFieldState extends State { style: widget.style, inputFormatters: widget.inputFormatter, maxLength: 1, + textCapitalization: widget.textCapitalization!, focusNode: _focusNodes[index], obscureText: widget.obscureText, decoration: InputDecoration(