Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/otp_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class OTPTextField extends StatefulWidget {

/// show the error border or not
final bool hasError;
final Color cursorColor;

final TextCapitalization textCapitalization;

Expand Down Expand Up @@ -70,6 +71,7 @@ class OTPTextField extends StatefulWidget {
this.fieldWidth = 30,
this.spaceBetween = 0,
this.otpFieldStyle,
this.cursorColor,
this.hasError = false,
this.keyboardType = TextInputType.number,
this.style = const TextStyle(),
Expand Down Expand Up @@ -180,6 +182,7 @@ class _OTPTextFieldState extends State<OTPTextField> {
right: isLast ? 0 : widget.spaceBetween,
),
child: TextField(
cursorColor : widget.cursorColor,
controller: _textControllers[index],
keyboardType: widget.keyboardType,
textCapitalization: widget.textCapitalization,
Expand Down