button style

This commit is contained in:
Alex 2025-10-02 12:08:06 -05:00 committed by shenlong-tanwen
parent 581ded2d03
commit 606a72d5c8

View file

@ -36,26 +36,44 @@ class DeleteLocalOnlyDialog extends StatelessWidget {
title: const Text("delete_dialog_title").tr(), title: const Text("delete_dialog_title").tr(),
content: const Text("delete_dialog_alert_local_non_backed_up").tr(), content: const Text("delete_dialog_alert_local_non_backed_up").tr(),
actions: [ actions: [
TextButton( SizedBox(
onPressed: () => context.pop(), width: double.infinity,
child: Text( height: 48,
"cancel", child: FilledButton(
style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold), onPressed: () => context.pop(),
).tr(), style: FilledButton.styleFrom(
backgroundColor: context.colorScheme.surfaceDim,
foregroundColor: context.primaryColor,
),
child: const Text("cancel", style: TextStyle(fontWeight: FontWeight.bold)).tr(),
),
), ),
TextButton( const SizedBox(height: 8),
onPressed: onDeleteBackedUpOnly, SizedBox(
child: Text( width: double.infinity,
"delete_local_dialog_ok_backed_up_only", height: 48,
style: TextStyle(color: context.colorScheme.tertiary, fontWeight: FontWeight.bold),
).tr(), child: FilledButton(
onPressed: onDeleteBackedUpOnly,
style: FilledButton.styleFrom(
backgroundColor: context.colorScheme.errorContainer,
foregroundColor: context.colorScheme.onErrorContainer,
),
child: const Text(
"delete_local_dialog_ok_backed_up_only",
style: TextStyle(fontWeight: FontWeight.bold),
).tr(),
),
), ),
TextButton( const SizedBox(height: 8),
onPressed: onForceDelete, SizedBox(
child: Text( width: double.infinity,
"delete_local_dialog_ok_force", height: 48,
style: TextStyle(color: Colors.red[400], fontWeight: FontWeight.bold), child: FilledButton(
).tr(), onPressed: onForceDelete,
style: FilledButton.styleFrom(backgroundColor: Colors.red[400], foregroundColor: Colors.white),
child: const Text("delete_local_dialog_ok_force", style: TextStyle(fontWeight: FontWeight.bold)).tr(),
),
), ),
], ],
); );