Refactor delete account button styles to use ButtonStyle for improved customization and consistency
This commit is contained in:
@@ -911,15 +911,34 @@ class _AccountSettingsDialogState extends State<AccountSettingsDialog> {
|
||||
width: 160,
|
||||
child: ElevatedButton(
|
||||
onPressed: _showDeleteAccountConfirmation,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppTheme.errorColor,
|
||||
foregroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
shadowColor: Colors.transparent,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
style: ButtonStyle(
|
||||
splashFactory: NoSplash.splashFactory,
|
||||
overlayColor: WidgetStateProperty.resolveWith<Color?>(
|
||||
(Set<WidgetState> states) {
|
||||
if (states.contains(WidgetState.pressed)) {
|
||||
return Colors.transparent;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
backgroundColor: WidgetStateProperty.all(
|
||||
AppTheme.errorColor,
|
||||
),
|
||||
foregroundColor: WidgetStateProperty.all(
|
||||
Colors.white,
|
||||
),
|
||||
elevation: WidgetStateProperty.all(0),
|
||||
shadowColor: WidgetStateProperty.all(
|
||||
Colors.transparent,
|
||||
),
|
||||
padding: WidgetStateProperty.all(
|
||||
const EdgeInsets.symmetric(vertical: 12),
|
||||
),
|
||||
shape: WidgetStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
),
|
||||
child: const Text(
|
||||
'Delete Account',
|
||||
|
||||
Reference in New Issue
Block a user