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:
@@ -493,9 +493,14 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
|
||||
if (!isLoggedIn) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return BlocBuilder<OrganizationBloc, OrganizationState>(
|
||||
return BlocBuilder<
|
||||
OrganizationBloc,
|
||||
OrganizationState
|
||||
>(
|
||||
builder: (context, orgState) {
|
||||
final hasSelectedOrg = orgState is OrganizationLoaded && orgState.selectedOrg != null;
|
||||
final hasSelectedOrg =
|
||||
orgState is OrganizationLoaded &&
|
||||
orgState.selectedOrg != null;
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
||||
@@ -25,7 +25,8 @@ class OrganizationSettingsDialog extends StatefulWidget {
|
||||
_OrganizationSettingsDialogState();
|
||||
}
|
||||
|
||||
class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog> {
|
||||
class _OrganizationSettingsDialogState
|
||||
extends State<OrganizationSettingsDialog> {
|
||||
int _selectedTabIndex = 0;
|
||||
List<Member> _members = [];
|
||||
List<Invitation> _invitations = [];
|
||||
@@ -213,6 +214,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
|
||||
IconButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
icon: Icon(Icons.close, color: AppTheme.secondaryText),
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -291,16 +294,11 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
|
||||
child: AnimatedDefaultTextStyle(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
style: TextStyle(
|
||||
color: isSelected
|
||||
? AppTheme.accentColor
|
||||
: AppTheme.secondaryText,
|
||||
color: isSelected ? AppTheme.accentColor : AppTheme.secondaryText,
|
||||
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
|
||||
fontSize: 14,
|
||||
),
|
||||
child: Text(
|
||||
text,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
child: Text(text, textAlign: TextAlign.center),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -362,6 +360,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
|
||||
color: AppTheme.errorColor,
|
||||
),
|
||||
onPressed: () => _removeMember(member.userId),
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
),
|
||||
],
|
||||
)
|
||||
@@ -404,6 +404,8 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
|
||||
trailing: IconButton(
|
||||
icon: Icon(Icons.cancel, color: AppTheme.errorColor),
|
||||
onPressed: () => _cancelInvitation(inv.id),
|
||||
splashColor: Colors.transparent,
|
||||
highlightColor: Colors.transparent,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -514,10 +516,28 @@ class _OrganizationSettingsDialogState extends State<OrganizationSettingsDialog>
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
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'),
|
||||
child: const Text('Accept'),
|
||||
),
|
||||
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),
|
||||
child: Text(
|
||||
'Reject',
|
||||
|
||||
Reference in New Issue
Block a user