Fix text alignment + visibility on app page (#680)

This commit is contained in:
Imran Remtulla
2023-07-16 11:52:18 -04:00
parent 1c390a7f04
commit 53dba06cc3

View File

@@ -57,6 +57,11 @@ class _AppPageState extends State<AppPage> {
app?.app.additionalSettings['versionDetection'] == app?.app.additionalSettings['versionDetection'] ==
'standardVersionDetection'; 'standardVersionDetection';
bool installedVersionIsEstimate = trackOnly ||
(app?.app.installedVersion != null &&
app?.app.additionalSettings['versionDetection'] ==
'noVersionDetection');
getInfoColumn() => Column( getInfoColumn() => Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -92,9 +97,7 @@ class _AppPageState extends State<AppPage> {
app?.app.latestVersion ?? tr('unknown') app?.app.latestVersion ?? tr('unknown')
])}\n${tr('installedVersionX', args: [ ])}\n${tr('installedVersionX', args: [
app?.app.installedVersion ?? tr('none') app?.app.installedVersion ?? tr('none')
])}${trackOnly ? ' ${tr('estimateInBrackets')}\n\n${tr('xIsTrackOnly', args: [ ])}${installedVersionIsEstimate ? '\n${tr('estimateInBrackets')}' : ''}',
tr('app')
])}' : ''}',
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: Theme.of(context).textTheme.bodyLarge!, style: Theme.of(context).textTheme.bodyLarge!,
), ),
@@ -105,11 +108,14 @@ class _AppPageState extends State<AppPage> {
Column( Column(
children: [ children: [
const SizedBox( const SizedBox(
height: 4, height: 16,
), ),
Text( Text(
tr('noVersionDetection'), '${trackOnly ? '${tr('xIsTrackOnly', args: [
tr('app')
])}\n' : ''}${tr('noVersionDetection')}',
style: Theme.of(context).textTheme.labelSmall, style: Theme.of(context).textTheme.labelSmall,
textAlign: TextAlign.center,
) )
], ],
), ),