Fix splash effects on all buttons in organization settings dialog

- Add splashColor: Colors.transparent and highlightColor: Colors.transparent to all IconButtons
- Add ButtonStyle with NoSplash.splashFactory and transparent overlayColor to all TextButtons
- Updated close button, remove member button, cancel invitation button, and accept/reject buttons
- Maintains consistent button behavior across the entire app
This commit is contained in:
Leon Bösche
2026-01-24 00:02:22 +01:00
parent 48c9c19a64
commit b4e9829f04
2 changed files with 35 additions and 10 deletions

View File

@@ -493,9 +493,14 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
if (!isLoggedIn) { if (!isLoggedIn) {
return const SizedBox.shrink(); return const SizedBox.shrink();
} }
return BlocBuilder<OrganizationBloc, OrganizationState>( return BlocBuilder<
OrganizationBloc,
OrganizationState
>(
builder: (context, orgState) { builder: (context, orgState) {
final hasSelectedOrg = orgState is OrganizationLoaded && orgState.selectedOrg != null; final hasSelectedOrg =
orgState is OrganizationLoaded &&
orgState.selectedOrg != null;
return Row( return Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [

View File

@@ -25,7 +25,8 @@ class OrganizationSettingsDialog extends StatefulWidget {
_OrganizationSettingsDialogState(); _OrganizationSettingsDialogState();
} }
class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog> { class _OrganizationSettingsDialogState
extends State<OrganizationSettingsDialog> {
int _selectedTabIndex = 0; int _selectedTabIndex = 0;
List<Member> _members = []; List<Member> _members = [];
List<Invitation> _invitations = []; List<Invitation> _invitations = [];
@@ -213,6 +214,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
IconButton( IconButton(
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
icon: Icon(Icons.close, color: AppTheme.secondaryText), icon: Icon(Icons.close, color: AppTheme.secondaryText),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
), ),
], ],
), ),
@@ -291,16 +294,11 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
child: AnimatedDefaultTextStyle( child: AnimatedDefaultTextStyle(
duration: const Duration(milliseconds: 200), duration: const Duration(milliseconds: 200),
style: TextStyle( style: TextStyle(
color: isSelected color: isSelected ? AppTheme.accentColor : AppTheme.secondaryText,
? AppTheme.accentColor
: AppTheme.secondaryText,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal, fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
fontSize: 14, fontSize: 14,
), ),
child: Text( child: Text(text, textAlign: TextAlign.center),
text,
textAlign: TextAlign.center,
),
), ),
), ),
), ),
@@ -362,6 +360,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
color: AppTheme.errorColor, color: AppTheme.errorColor,
), ),
onPressed: () => _removeMember(member.userId), onPressed: () => _removeMember(member.userId),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
), ),
], ],
) )
@@ -404,6 +404,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
trailing: IconButton( trailing: IconButton(
icon: Icon(Icons.cancel, color: AppTheme.errorColor), icon: Icon(Icons.cancel, color: AppTheme.errorColor),
onPressed: () => _cancelInvitation(inv.id), onPressed: () => _cancelInvitation(inv.id),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
), ),
); );
}, },
@@ -514,10 +516,28 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
TextButton( TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
if (states.contains(WidgetState.pressed)) {
return Colors.transparent;
}
return null;
}),
),
onPressed: () => _acceptJoinRequest(req.id, 'member'), onPressed: () => _acceptJoinRequest(req.id, 'member'),
child: const Text('Accept'), child: const Text('Accept'),
), ),
TextButton( TextButton(
style: ButtonStyle(
splashFactory: NoSplash.splashFactory,
overlayColor: WidgetStateProperty.resolveWith<Color?>((Set<WidgetState> states) {
if (states.contains(WidgetState.pressed)) {
return Colors.transparent;
}
return null;
}),
),
onPressed: () => _rejectJoinRequest(req.id), onPressed: () => _rejectJoinRequest(req.id),
child: Text( child: Text(
'Reject', 'Reject',