From 5d0afa3bfb1646f10baf1580d88f25e56e98fb78 Mon Sep 17 00:00:00 2001 From: Dennis Fokin Date: Fri, 14 Jul 2023 10:55:22 +0200 Subject: [PATCH] Small fixup --- lib/oath/views/list_screen.dart | 37 ++++++++++++++------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/lib/oath/views/list_screen.dart b/lib/oath/views/list_screen.dart index b8bc7775..7a883c0f 100644 --- a/lib/oath/views/list_screen.dart +++ b/lib/oath/views/list_screen.dart @@ -124,7 +124,7 @@ class _ListScreenState extends ConsumerState { }); }, icon: const Icon(Icons.edit_outlined), - color: Colors.white, + color: darkMode ? Colors.white : Colors.black, ), ]), title: Text(getTitle(cred), @@ -132,30 +132,25 @@ class _ListScreenState extends ConsumerState { value: isUnique(cred) ? (checkedCreds[cred] ?? true) : false, enabled: isUnique(cred), - subtitle: cred.issuer != null + subtitle: cred.issuer != null || !isUnique(cred) ? Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text(cred.name, - overflow: TextOverflow.fade, - maxLines: 1, - softWrap: false), - isUnique(cred) - ? Text('') - : Text( - l10n.l_name_already_exists, - style: TextStyle( - color: primaryRed, - fontSize: 12, - ), - ) + if (cred.issuer != null) + Text(cred.name, + overflow: TextOverflow.fade, + maxLines: 1, + softWrap: false), + if (!isUnique(cred)) + Text( + l10n.l_name_already_exists, + style: const TextStyle( + color: primaryRed, + fontSize: 12, + ), + ) ]) - : isUnique(cred) - ? null - : Text( - l10n.l_name_already_exists, - style: TextStyle(color: primaryRed, fontSize: 12), - ), + : null, onChanged: (bool? value) { setState(() { checkedCreds[cred] = value!;