Fix clear button

This commit is contained in:
Ankit Mahato
2025-04-06 04:12:05 +05:30
parent afb899a356
commit d037caee2d

View File

@ -163,11 +163,11 @@ class SettingsPage extends ConsumerWidget {
subtitle: const Text('Delete all requests data from the disk'), subtitle: const Text('Delete all requests data from the disk'),
trailing: FilledButton.tonalIcon( trailing: FilledButton.tonalIcon(
style: FilledButton.styleFrom( style: FilledButton.styleFrom(
backgroundColor: settings.isDark backgroundColor:
? kColorDarkDanger settings.isDark ? kColorDarkDanger : kColorLightDanger,
: kColorLightDanger, surfaceTintColor: kColorRed,
surfaceTintColor: kColorRed, foregroundColor: Theme.of(context).colorScheme.onPrimary,
foregroundColor: Theme.of(context).colorScheme.onPrimary), ),
onPressed: clearingData onPressed: clearingData
? null ? null
: () => showDialog<String>( : () => showDialog<String>(
@ -217,9 +217,10 @@ class SettingsPage extends ConsumerWidget {
), ),
), ),
label: const Text("Clear"), label: const Text("Clear"),
icon: const Icon( icon: Icon(
Icons.delete_forever_rounded, Icons.delete_forever_rounded,
size: 20, size: 20,
color: Theme.of(context).colorScheme.onPrimary,
), ),
), ),
), ),