fix: watchos settings (#403)

Fixes #401
This commit is contained in:
lollipopkit🏳️‍⚧️
2024-06-22 21:09:05 +08:00
committed by GitHub
parent c9a2c1d0e4
commit 1fd68722da
4 changed files with 11 additions and 28 deletions

View File

@@ -1,6 +1,4 @@
PODS: PODS:
- countly_flutter (24.4.1):
- Flutter
- device_info_plus (0.0.1): - device_info_plus (0.0.1):
- Flutter - Flutter
- file_picker (0.0.1): - file_picker (0.0.1):
@@ -36,7 +34,6 @@ PODS:
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
- countly_flutter (from `.symlinks/plugins/countly_flutter/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`) - file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
@@ -55,8 +52,6 @@ DEPENDENCIES:
- watch_connectivity (from `.symlinks/plugins/watch_connectivity/ios`) - watch_connectivity (from `.symlinks/plugins/watch_connectivity/ios`)
EXTERNAL SOURCES: EXTERNAL SOURCES:
countly_flutter:
:path: ".symlinks/plugins/countly_flutter/ios"
device_info_plus: device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios" :path: ".symlinks/plugins/device_info_plus/ios"
file_picker: file_picker:
@@ -91,7 +86,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/watch_connectivity/ios" :path: ".symlinks/plugins/watch_connectivity/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
countly_flutter: 56233d921c6b4e0a720774a39b8ee8110d6f8d91
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
file_picker: c79185e70b9b45728cde2a8d8da454e0cb43f287 file_picker: c79185e70b9b45728cde2a8d8da454e0cb43f287
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7

View File

@@ -82,9 +82,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
Widget _buildWatchApp() { Widget _buildWatchApp() {
return FutureWidget( return FutureWidget(
future: () async { future: () async {
if (!await wc.isPaired) { if (!await wc.isPaired) return null;
return null;
}
return await wc.applicationContext; return await wc.applicationContext;
}(), }(),
loading: UIs.centerLoading, loading: UIs.centerLoading,
@@ -114,16 +112,15 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
void _onTapWatchApp(Map<String, dynamic> map) async { void _onTapWatchApp(Map<String, dynamic> map) async {
final urls = Map<String, String>.from(map['urls'] as Map? ?? {}); final urls = Map<String, String>.from(map['urls'] as Map? ?? {});
final result = await AppRoutes.kvEditor(data: urls).go(context); final result = await AppRoutes.kvEditor(data: urls).go(context);
if (result == null || result! is Map<String, String>) return; if (result == null || result is! Map<String, String>) return;
try { try {
await wc.updateApplicationContext({'urls': result}); await context.showLoadingDialog(fn: () async {
} catch (e, trace) { await wc.updateApplicationContext({'urls': result});
context.showRoundDialog( });
title: l10n.error, } catch (e, s) {
child: Text('${l10n.save}:\n$e'), context.showErrDialog(e: e, s: s, operation: 'Watch Context');
); Loggers.app.warning('Update watch config failed', e, s);
Loggers.app.warning('Update watch config failed', e, trace);
} }
} }
} }

View File

@@ -1396,19 +1396,11 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: "v1.0.84" ref: "v1.0.85"
resolved-ref: "50405d87bea86aece143c235b8b17263d37de3ef" resolved-ref: "13e42750a8f8dbf9a6c7890198b0dd18283a0692"
url: "https://github.com/lollipopkit/watch_connectivity" url: "https://github.com/lollipopkit/watch_connectivity"
source: git source: git
version: "0.1.5" version: "0.1.5"
watch_connectivity_platform_interface:
dependency: transitive
description:
name: watch_connectivity_platform_interface
sha256: "9074115391bd764c08a17346fcbc4d5c0b555672defbe6928ac648503b54aa9c"
url: "https://pub.dev"
source: hosted
version: "0.1.2"
watcher: watcher:
dependency: transitive dependency: transitive
description: description:

View File

@@ -50,7 +50,7 @@ dependencies:
watch_connectivity: watch_connectivity:
git: git:
url: https://github.com/lollipopkit/watch_connectivity url: https://github.com/lollipopkit/watch_connectivity
ref: v1.0.84 ref: v1.0.85
plain_notification_token: plain_notification_token:
git: git:
url: https://github.com/lollipopkit/plain_notification_token url: https://github.com/lollipopkit/plain_notification_token