Skip to content

Commit 2b28b04

Browse files
committed
chore: update WinSparkle to 0.8.3
1 parent 1d81a82 commit 2b28b04

File tree

25 files changed

+931
-877
lines changed

25 files changed

+931
-877
lines changed

packages/auto_updater/example/lib/pages/home.dart

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,23 @@ class _HomePageState extends State<HomePage> with UpdaterListener {
140140
}
141141

142142
@override
143-
void onUpdaterUserUpdateChoice(
144-
UserUpdateChoice? choice,
145-
AppcastItem? appcastItem,
146-
) {
143+
void onUpdaterUpdateSkipped(AppcastItem? appcastItem) {
147144
if (kDebugMode) {
148-
print('onUpdaterUserUpdateChoice: $choice, ${appcastItem?.toJson()}');
145+
print('onUpdaterUpdateSkipped: ${appcastItem?.toJson()}');
146+
}
147+
}
148+
149+
@override
150+
void onUpdaterUpdateCancelled(AppcastItem? appcastItem) {
151+
if (kDebugMode) {
152+
print('onUpdaterUpdateCancelled: ${appcastItem?.toJson()}');
153+
}
154+
}
155+
156+
@override
157+
void onUpdaterUpdateInstalled(AppcastItem? appcastItem) {
158+
if (kDebugMode) {
159+
print('onUpdaterUpdateInstalled: ${appcastItem?.toJson()}');
149160
}
150161
}
151162
}

packages/auto_updater/lib/src/auto_updater.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ class AutoUpdater {
108108
case UpdaterEvent.updateInstalled:
109109
// this event is only available on Windows
110110
listener.onUpdaterUpdateInstalled(appcastItem);
111+
case UpdaterEvent.updateDismissed:
112+
// this event is only available on Windows
113+
listener.onUpdaterUpdateCancelled(appcastItem);
114+
case UpdaterEvent.updatePostponed:
115+
case UpdaterEvent.userRunInstaller:
116+
// this event is only available on Windows, ignore it
117+
break;
111118
}
112119
}
113120
}

packages/auto_updater/lib/src/events.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ enum UpdaterEvent {
1010
userUpdateChoice,
1111

1212
// these events are only available on Windows
13+
updatePostponed,
14+
updateDismissed,
1315
updateCancelled,
1416
updateSkipped,
15-
updateInstalled;
17+
updateInstalled,
18+
userRunInstaller;
1619

1720
static UpdaterEvent fromString(String name) {
1821
switch (name) {
@@ -36,6 +39,12 @@ enum UpdaterEvent {
3639
return UpdaterEvent.updateSkipped;
3740
case 'update-installed':
3841
return UpdaterEvent.updateInstalled;
42+
case 'update-postponed':
43+
return UpdaterEvent.updatePostponed;
44+
case 'update-dismissed':
45+
return UpdaterEvent.updateDismissed;
46+
case 'user-run-installer':
47+
return UpdaterEvent.userRunInstaller;
3948
default:
4049
throw ArgumentError('Invalid event name: $name');
4150
}

packages/auto_updater/pubspec.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ flutter:
3838
default_package: auto_updater_macos
3939
windows:
4040
default_package: auto_updater_windows
41+
linux:
42+
default_package: auto_updater_linux
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)