diff --git a/lib/src/pin_code_fields.dart b/lib/src/pin_code_fields.dart index 04d67463..590fad72 100644 --- a/lib/src/pin_code_fields.dart +++ b/lib/src/pin_code_fields.dart @@ -418,8 +418,8 @@ class _PinCodeTextFieldState extends State (_selectedIndex == index + 1 && index + 1 == widget.length)) && _focusNode.hasFocus && widget.showCursor) { - final cursorColor = - widget.cursorColor ?? Theme.of(widget.appContext).cursorColor; + final cursorColor = widget.cursorColor ?? + Theme.of(widget.appContext).textSelectionTheme.cursorColor; final cursorHeight = widget.cursorHeight ?? widget.textStyle.fontSize + 8; if ((_selectedIndex == index + 1 && index + 1 == widget.length)) {