Skip to content

Commit 10dbbf5

Browse files
author
Lukas Gundermann
committed
style: Adjust hover color for GhostButtonTheme
This commit updates the hover effect for ghost buttons to improve visual feedback. The background color on hover has been changed from `Colors.gray[100]` to `Colors.gray[200]` in the light theme. This makes the hover state more distinct and noticeable for the user. Additionally, the logic has been simplified to only apply a custom decoration when the button is hovered, falling back to the default otherwise.
1 parent e62380c commit 10dbbf5

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

lib/screens/widgets/overrides/button_themes.dart

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,12 @@ class ButtonThemes extends StatelessWidget {
7272
child: ComponentTheme(
7373
data: GhostButtonTheme(
7474
decoration: (context, states, defaultDecoration) {
75-
if (states.contains(WidgetState.disabled)) {
76-
return defaultDecoration.copyWithIfBoxDecoration(
77-
color: Colors.transparent,
78-
);
79-
} else if (states.contains(WidgetState.hovered)) {
80-
return defaultDecoration.copyWithIfBoxDecoration(
81-
color: isDark ? Colors.gray[600] : Colors.gray[100],
82-
);
83-
} else {
75+
if (states.contains(WidgetState.hovered)) {
8476
return defaultDecoration.copyWithIfBoxDecoration(
85-
color: Colors.transparent,
77+
color: isDark ? Colors.gray[600] : Colors.gray[200],
8678
);
8779
}
80+
return defaultDecoration;
8881
},
8982
textStyle: (context, states, defaultTextStyle) {
9083
if (states.contains(WidgetState.disabled)) {

0 commit comments

Comments
 (0)