Refactor button color logic and improve readability in home page and organization settings dialog

This commit is contained in:
Leon Bösche
2026-01-24 00:22:38 +01:00
parent 56d8054d90
commit 960d2c8805
2 changed files with 9 additions and 3 deletions

View File

@@ -378,7 +378,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
}) {
final isSelected = _selectedTab == label;
final highlightColor = const Color.fromARGB(255, 100, 200, 255);
final defaultColor = onTap != null ? AppTheme.primaryText : AppTheme.secondaryText;
final defaultColor = onTap != null
? AppTheme.primaryText
: AppTheme.secondaryText;
return GestureDetector(
onTap:

View File

@@ -550,7 +550,9 @@ class _OrganizationSettingsDialogState
TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
overlayColor: WidgetStateProperty.resolveWith<Color?>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.pressed)) {
return Colors.transparent;
}
@@ -563,7 +565,9 @@ class _OrganizationSettingsDialogState
TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
overlayColor: WidgetStateProperty.resolveWith<Color?>((
Set<WidgetState> states,
) {
if (states.contains(WidgetState.pressed)) {
return Colors.transparent;
}