Refactor button color logic and improve readability in home page and organization settings dialog
This commit is contained in:
@@ -378,7 +378,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
|||||||
}) {
|
}) {
|
||||||
final isSelected = _selectedTab == label;
|
final isSelected = _selectedTab == label;
|
||||||
final highlightColor = const Color.fromARGB(255, 100, 200, 255);
|
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(
|
return GestureDetector(
|
||||||
onTap:
|
onTap:
|
||||||
|
|||||||
@@ -550,7 +550,9 @@ class _OrganizationSettingsDialogState
|
|||||||
TextButton(
|
TextButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
splashFactory: NoSplash.splashFactory,
|
splashFactory: NoSplash.splashFactory,
|
||||||
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
|
overlayColor: WidgetStateProperty.resolveWith<Color?>((
|
||||||
|
Set<WidgetState> states,
|
||||||
|
) {
|
||||||
if (states.contains(WidgetState.pressed)) {
|
if (states.contains(WidgetState.pressed)) {
|
||||||
return Colors.transparent;
|
return Colors.transparent;
|
||||||
}
|
}
|
||||||
@@ -563,7 +565,9 @@ class _OrganizationSettingsDialogState
|
|||||||
TextButton(
|
TextButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
splashFactory: NoSplash.splashFactory,
|
splashFactory: NoSplash.splashFactory,
|
||||||
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
|
overlayColor: WidgetStateProperty.resolveWith<Color?>((
|
||||||
|
Set<WidgetState> states,
|
||||||
|
) {
|
||||||
if (states.contains(WidgetState.pressed)) {
|
if (states.contains(WidgetState.pressed)) {
|
||||||
return Colors.transparent;
|
return Colors.transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user