diff --git a/lib/components/updater.dart b/lib/components/updater.dart index 4885730..326b7f9 100644 --- a/lib/components/updater.dart +++ b/lib/components/updater.dart @@ -24,7 +24,6 @@ class UpdateBottomSheet extends StatefulWidget { class _UpdateBottomSheetState extends State { static Map downloading = {}; bool failed = false; - double? progress; @override Widget build(BuildContext context) { @@ -79,7 +78,7 @@ class _UpdateBottomSheetState extends State { listenable: downloading[widget.url]!.progress, builder: (context, _) { return CircularProgressIndicator( - strokeWidth: 2, value: progress, backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest); + strokeWidth: 2, value: downloading[widget.url]!.progress.value, backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest); })), ]) : failed diff --git a/packages/api/lib/src/models.dart b/packages/api/lib/src/models.dart index 6b7beea..1723fb7 100644 --- a/packages/api/lib/src/models.dart +++ b/packages/api/lib/src/models.dart @@ -514,7 +514,7 @@ class UpdateResp { UpdateResp.fromJson(Json json) : assets = List.generate(json['assets'].length, (index) => UpdateRespAsset.fromJson(json['assets'][index])), - tagName = Version.fromString(json['tag_name']), + tagName = Version.fromString(json['tag_name'].substring(1)), comment = json['body'], createAt = (json['published_at'] as String).toDateTime(); }