Skip to content

Commit

Permalink
MacosTextField : Default cursor color to text color when not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
driftwoodstudio committed Mar 1, 2025
1 parent 5fa73f3 commit 6c6f8e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/fields/text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,8 @@ class _MacosTextFieldState extends State<MacosTextField>
widget.keyboardAppearance ?? MacosTheme.brightnessOf(context);
Color? cursorColor;
cursorColor = MacosDynamicColor.maybeResolve(widget.cursorColor, context);
cursorColor ??=
cursorColor ??= textStyle.color; // next best is "match text"
cursorColor ??= // last resort - fall back to theme forground color
themeData.brightness.isDark ? MacosColors.white : MacosColors.black;
final Color disabledColor =
MacosDynamicColor.resolve(_kDisabledBackground, context);
Expand Down

0 comments on commit 6c6f8e5

Please sign in to comment.