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

View File

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

View File

@@ -1396,19 +1396,11 @@ packages:
dependency: "direct main"
description:
path: "."
ref: "v1.0.84"
resolved-ref: "50405d87bea86aece143c235b8b17263d37de3ef"
ref: "v1.0.85"
resolved-ref: "13e42750a8f8dbf9a6c7890198b0dd18283a0692"
url: "https://github.com/lollipopkit/watch_connectivity"
source: git
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:
dependency: transitive
description:

View File

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