mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
remove yk5series in favor of generic image
This commit is contained in:
parent
51b90c89b5
commit
deefdb1344
Binary file not shown.
Before Width: | Height: | Size: 46 KiB |
@ -18,8 +18,6 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
import '../management/models.dart';
|
import '../management/models.dart';
|
||||||
|
|
||||||
const _genericYubiKeyImageName = 'generic';
|
|
||||||
|
|
||||||
const _imagesForName = {
|
const _imagesForName = {
|
||||||
'YubiKey 4': 'yk4series',
|
'YubiKey 4': 'yk4series',
|
||||||
'YubiKey Edge': 'ykedge',
|
'YubiKey Edge': 'ykedge',
|
||||||
@ -29,7 +27,6 @@ const _imagesForName = {
|
|||||||
'Security Key by Yubico': 'sky2',
|
'Security Key by Yubico': 'sky2',
|
||||||
'Security Key NFC': 'sky3',
|
'Security Key NFC': 'sky3',
|
||||||
'Security Key C NFC': 'skycnfc',
|
'Security Key C NFC': 'skycnfc',
|
||||||
'YubiKey FIDO': _genericYubiKeyImageName,
|
|
||||||
'YubiKey NEO': 'neo',
|
'YubiKey NEO': 'neo',
|
||||||
'YubiKey Standard': 'standard',
|
'YubiKey Standard': 'standard',
|
||||||
};
|
};
|
||||||
@ -66,13 +63,9 @@ class ProductImage extends StatelessWidget {
|
|||||||
image ??= isNfc
|
image ??= isNfc
|
||||||
? _imagesForFormFactorNfc[formFactor]
|
? _imagesForFormFactorNfc[formFactor]
|
||||||
: _imagesForFormFactor[formFactor];
|
: _imagesForFormFactor[formFactor];
|
||||||
image ??= 'yk5series';
|
image ??= Theme.of(context).brightness == Brightness.dark
|
||||||
|
? 'generic_dark'
|
||||||
// generic image has theme variants
|
: 'generic';
|
||||||
if (image == _genericYubiKeyImageName &&
|
|
||||||
Theme.of(context).brightness == Brightness.dark) {
|
|
||||||
image = '${_genericYubiKeyImageName}_dark';
|
|
||||||
}
|
|
||||||
|
|
||||||
return Image.asset(
|
return Image.asset(
|
||||||
'assets/product-images/$image.png',
|
'assets/product-images/$image.png',
|
||||||
|
Loading…
Reference in New Issue
Block a user