fix: close installer after opening patched app

This commit is contained in:
Alberto Ponces 2022-08-22 00:54:58 +01:00
parent 092d645726
commit 9317714651

View File

@ -17,8 +17,14 @@ class InstallerView extends StatelessWidget {
floatingActionButton: Visibility( floatingActionButton: Visibility(
visible: !model.isPatching, visible: !model.isPatching,
child: FloatingActionButton.extended( child: FloatingActionButton.extended(
onPressed: () => onPressed: () {
model.isInstalled ? model.openApp() : model.installResult(), if (model.isInstalled) {
model.openApp();
Navigator.of(context).pop();
} else {
model.installResult();
}
},
label: I18nText(model.isInstalled label: I18nText(model.isInstalled
? 'installerView.fabOpenButton' ? 'installerView.fabOpenButton'
: 'installerView.fabInstallButton'), : 'installerView.fabInstallButton'),