Avoid overflow for long version strings on Apps page

This commit is contained in:
Imran Remtulla
2022-12-08 18:54:40 -05:00
parent a4555f07f9
commit 1b892f4e0d

View File

@@ -253,7 +253,9 @@ class AppsPageState extends State<AppsPage> {
fontWeight: sortedApps[index].app.pinned fontWeight: sortedApps[index].app.pinned
? FontWeight.bold ? FontWeight.bold
: FontWeight.normal)), : FontWeight.normal)),
trailing: sortedApps[index].downloadProgress != null trailing: SingleChildScrollView(
reverse: true,
child: sortedApps[index].downloadProgress != null
? Text(tr('percentProgress', args: [ ? Text(tr('percentProgress', args: [
sortedApps[index] sortedApps[index]
.downloadProgress .downloadProgress
@@ -265,14 +267,13 @@ class AppsPageState extends State<AppsPage> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
SingleChildScrollView( SizedBox(
child: SizedBox( width: 100,
width: 80,
child: Text( child: Text(
'${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}', '${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}',
overflow: TextOverflow.fade, overflow: TextOverflow.fade,
textAlign: TextAlign.end, textAlign: TextAlign.end,
))), )),
sortedApps[index].app.installedVersion != null && sortedApps[index].app.installedVersion != null &&
sortedApps[index].app.installedVersion != sortedApps[index].app.installedVersion !=
sortedApps[index].app.latestVersion sortedApps[index].app.latestVersion
@@ -294,7 +295,7 @@ class AppsPageState extends State<AppsPage> {
)) ))
: const SizedBox(), : const SizedBox(),
], ],
)), ))),
onTap: () { onTap: () {
if (selectedApps.isNotEmpty) { if (selectedApps.isNotEmpty) {
toggleAppSelected(sortedApps[index].app); toggleAppSelected(sortedApps[index].app);