remove yk5series in favor of generic image

This commit is contained in:
Adam Velebil 2022-10-20 12:43:17 +02:00
parent 51b90c89b5
commit deefdb1344
No known key found for this signature in database
GPG Key ID: AC6D6B9D715FC084
2 changed files with 3 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View File

@ -18,8 +18,6 @@ import 'package:flutter/material.dart';
import '../management/models.dart';
const _genericYubiKeyImageName = 'generic';
const _imagesForName = {
'YubiKey 4': 'yk4series',
'YubiKey Edge': 'ykedge',
@ -29,7 +27,6 @@ const _imagesForName = {
'Security Key by Yubico': 'sky2',
'Security Key NFC': 'sky3',
'Security Key C NFC': 'skycnfc',
'YubiKey FIDO': _genericYubiKeyImageName,
'YubiKey NEO': 'neo',
'YubiKey Standard': 'standard',
};
@ -66,13 +63,9 @@ class ProductImage extends StatelessWidget {
image ??= isNfc
? _imagesForFormFactorNfc[formFactor]
: _imagesForFormFactor[formFactor];
image ??= 'yk5series';
// generic image has theme variants
if (image == _genericYubiKeyImageName &&
Theme.of(context).brightness == Brightness.dark) {
image = '${_genericYubiKeyImageName}_dark';
}
image ??= Theme.of(context).brightness == Brightness.dark
? 'generic_dark'
: 'generic';
return Image.asset(
'assets/product-images/$image.png',