From 9bc1502ad434f8f8f39069cb0536943ac6b0ef1b Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 26 Feb 2023 09:08:28 +0100 Subject: [PATCH] Fix active icon color --- lib/src/material/spin_box.dart | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/src/material/spin_box.dart b/lib/src/material/spin_box.dart index 34fbc22..0b00ff9 100644 --- a/lib/src/material/spin_box.dart +++ b/lib/src/material/spin_box.dart @@ -277,21 +277,9 @@ class SpinBox extends BaseSpinBox { } class _SpinBoxState extends State with SpinBoxMixin { - Color _activeColor(ThemeData theme) { - if (hasFocus) { - switch (theme.brightness) { - case Brightness.dark: - return theme.colorScheme.secondary; - case Brightness.light: - return theme.primaryColor; - } - } - return theme.hintColor; - } - Color? _iconColor(ThemeData theme, String? errorText) { if (!widget.enabled) return theme.disabledColor; - if (hasFocus && errorText == null) return _activeColor(theme); + if (hasFocus && errorText == null) return theme.colorScheme.primary; switch (theme.brightness) { case Brightness.dark: