From f92418ea4b3d3bf07d189a1e80e8af4fd9dbf059 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 15 Dec 2024 13:34:32 +0800 Subject: [PATCH] :sparkles: System Share on Android --- lib/providers/widget.dart | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/providers/widget.dart b/lib/providers/widget.dart index 72c29fb..77324e0 100644 --- a/lib/providers/widget.dart +++ b/lib/providers/widget.dart @@ -23,14 +23,16 @@ class HomeWidgetProvider { Future updateWidget() async { if (kIsWeb || !(Platform.isAndroid || Platform.isIOS)) return; - const widgets = ["SolarFeaturedPostWidget", "SolarCheckInWidget"]; - for(final widget in widgets) { - await HomeWidget.updateWidget( - name: widget, - iOSName: widget, - androidName: "com.solsynth.solian.$widget", - qualifiedAndroidName: "group.solsynth.solian.$widget", - ); + if (Platform.isIOS) { + const widgets = ["SolarFeaturedPostWidget", "SolarCheckInWidget"]; + for (final widget in widgets) { + await HomeWidget.updateWidget( + name: widget, + iOSName: widget, + androidName: "com.solsynth.solian.$widget", + qualifiedAndroidName: "group.solsynth.solian.$widget", + ); + } } } }