fix: download button in desktop
This commit is contained in:
parent
9057ee92c6
commit
b007bec3c2
2 changed files with 7 additions and 1 deletions
|
@ -140,6 +140,7 @@ class LatestVersionInfo {
|
|||
final bool? shouldForceUpdate;
|
||||
final int lastSupportedVersionCode;
|
||||
final String? url;
|
||||
final String? release;
|
||||
final int? size;
|
||||
final bool? shouldNotify;
|
||||
|
||||
|
@ -150,6 +151,7 @@ class LatestVersionInfo {
|
|||
this.shouldForceUpdate,
|
||||
this.lastSupportedVersionCode,
|
||||
this.url,
|
||||
this.release,
|
||||
this.size,
|
||||
this.shouldNotify,
|
||||
);
|
||||
|
@ -162,6 +164,7 @@ class LatestVersionInfo {
|
|||
map['shouldForceUpdate'],
|
||||
map['lastSupportedVersionCode'] ?? 1,
|
||||
map['url'],
|
||||
map['release'],
|
||||
map['size'],
|
||||
map['shouldNotify'],
|
||||
);
|
||||
|
|
|
@ -6,6 +6,7 @@ import 'package:ente_auth/ente_theme_data.dart';
|
|||
import 'package:ente_auth/l10n/l10n.dart';
|
||||
import 'package:ente_auth/services/update_service.dart';
|
||||
import 'package:ente_auth/theme/ente_theme.dart';
|
||||
import 'package:ente_auth/utils/platform_util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:open_filex/open_filex.dart';
|
||||
|
@ -75,7 +76,9 @@ class _AppUpdateDialogState extends State<AppUpdateDialog> {
|
|||
),
|
||||
),
|
||||
onPressed: () => launchUrlString(
|
||||
widget.latestVersionInfo!.url!,
|
||||
PlatformUtil.isDesktop()
|
||||
? widget.latestVersionInfo!.release!
|
||||
: widget.latestVersionInfo!.url!,
|
||||
mode: LaunchMode.externalApplication,
|
||||
),
|
||||
child: Text(
|
||||
|
|
Loading…
Add table
Reference in a new issue