From 53dba06cc365f74de9057a73ee5b0fb6bf6aac62 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 16 Jul 2023 11:52:18 -0400 Subject: [PATCH] Fix text alignment + visibility on app page (#680) --- lib/pages/app.dart | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/pages/app.dart b/lib/pages/app.dart index 2ba6a96..4d97d54 100644 --- a/lib/pages/app.dart +++ b/lib/pages/app.dart @@ -57,6 +57,11 @@ class _AppPageState extends State { app?.app.additionalSettings['versionDetection'] == 'standardVersionDetection'; + bool installedVersionIsEstimate = trackOnly || + (app?.app.installedVersion != null && + app?.app.additionalSettings['versionDetection'] == + 'noVersionDetection'); + getInfoColumn() => Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.stretch, @@ -92,9 +97,7 @@ class _AppPageState extends State { app?.app.latestVersion ?? tr('unknown') ])}\n${tr('installedVersionX', args: [ app?.app.installedVersion ?? tr('none') - ])}${trackOnly ? ' ${tr('estimateInBrackets')}\n\n${tr('xIsTrackOnly', args: [ - tr('app') - ])}' : ''}', + ])}${installedVersionIsEstimate ? '\n${tr('estimateInBrackets')}' : ''}', textAlign: TextAlign.end, style: Theme.of(context).textTheme.bodyLarge!, ), @@ -105,11 +108,14 @@ class _AppPageState extends State { Column( children: [ const SizedBox( - height: 4, + height: 16, ), Text( - tr('noVersionDetection'), + '${trackOnly ? '${tr('xIsTrackOnly', args: [ + tr('app') + ])}\n' : ''}${tr('noVersionDetection')}', style: Theme.of(context).textTheme.labelSmall, + textAlign: TextAlign.center, ) ], ),