'Already Installed' button also takes 'Already Updated'

This commit is contained in:
Imran Remtulla
2022-09-17 18:11:00 -04:00
parent cb4dfff1b9
commit 87e31c37aa

View File

@@ -95,15 +95,15 @@ class _AppPageState extends State<AppPage> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
if (app?.app.installedVersion == null) if (app?.app.installedVersion != app?.app.latestVersion)
IconButton( IconButton(
onPressed: () { onPressed: () {
showDialog( showDialog(
context: context, context: context,
builder: (BuildContext ctx) { builder: (BuildContext ctx) {
return AlertDialog( return AlertDialog(
title: const Text( title: Text(
'App Already Installed?'), 'App Already ${app?.app.installedVersion == null ? 'Installed' : 'Updated'}?'),
actions: [ actions: [
TextButton( TextButton(
onPressed: () { onPressed: () {