adds missing keys to ButtonSegments

This commit is contained in:
Adam Velebil 2024-02-09 14:52:21 +01:00
parent e35ff52a24
commit a685743c74
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10

View File

@ -208,7 +208,15 @@ class _ResetDialogState extends ConsumerState<ResetDialog> {
.where((c) => supported & c.value != 0)
.map((c) => ButtonSegment(
value: c,
icon: Icon(c._icon),
icon: Icon(
c._icon,
key: switch (c) {
Capability.oath => factoryResetPickResetOath,
Capability.fido2 => factoryResetPickResetFido2,
Capability.piv => factoryResetPickResetPiv,
_ => const Key('_invalid') // no reset
},
),
label: showLabels
? Text(c.getDisplayName(l10n))
: null,