Commit e277b5d1ff25839d25bad64ce7d026587ff401e6

Authored by 权海
1 parent cf089e8c

feat(ui):兼容移除好友显示在表盘

... ... @@ -325,7 +325,7 @@ interface PlatformHostApi {
*/
fun updateLoginInfo(jsonString: String, baseUrl: String)
/** 设置好友显示到表盘 */
fun updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo)
fun updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo?)
/** 刷新表盘 */
fun refreshWatchSurface()
/** 请求苹果登录 */
... ... @@ -389,7 +389,7 @@ interface PlatformHostApi {
if (api != null) {
channel.setMessageHandler { message, reply ->
val args = message as List<Any?>
val otherInfoArg = args[0] as WatchAppOtherInfo
val otherInfoArg = args[0] as WatchAppOtherInfo?
val wrapped: List<Any?> = try {
api.updateWatchOtherUserInfo(otherInfoArg)
listOf(null)
... ...
... ... @@ -359,7 +359,7 @@ protocol PlatformHostApi {
/// baseUrl: 请求地址, https://api.doublefeel.cn
func updateLoginInfo(jsonString: String, baseUrl: String) throws
/// 设置好友显示到表盘
func updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo) throws
func updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo?) throws
/// 刷新表盘
func refreshWatchSurface() throws
/// 请求苹果登录
... ... @@ -419,7 +419,7 @@ class PlatformHostApiSetup {
if let api = api {
updateWatchOtherUserInfoChannel.setMessageHandler { message, reply in
let args = message as! [Any?]
let otherInfoArg = args[0] as! WatchAppOtherInfo
let otherInfoArg: WatchAppOtherInfo? = nilOrValue(args[0])
do {
try api.updateWatchOtherUserInfo(otherInfo: otherInfoArg)
reply(wrapResult(nil))
... ...
... ... @@ -409,7 +409,7 @@ class PlatformHostApi {
}
/// 设置好友显示到表盘
Future<void> updateWatchOtherUserInfo(WatchAppOtherInfo otherInfo) async {
Future<void> updateWatchOtherUserInfo(WatchAppOtherInfo? otherInfo) async {
final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.PlatformHostApi.updateWatchOtherUserInfo$pigeonVar_messageChannelSuffix';
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
... ...
... ... @@ -117,7 +117,7 @@ abstract class PlatformHostApi {
void updateLoginInfo(String jsonString, String baseUrl);
/// 设置好友显示到表盘
void updateWatchOtherUserInfo(WatchAppOtherInfo otherInfo);
void updateWatchOtherUserInfo(WatchAppOtherInfo? otherInfo);
/// 刷新表盘
void refreshWatchSurface();
... ...
... ... @@ -1064,10 +1064,10 @@ packages:
dependency: transitive
description:
name: url_launcher_linux
sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a
sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
version: "3.2.1"
url_launcher_platform_interface:
dependency: transitive
description:
... ... @@ -1080,18 +1080,18 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34"
sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
url: "https://pub.dev"
source: hosted
version: "2.4.3"
version: "2.4.1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f"
sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
url: "https://pub.dev"
source: hosted
version: "3.1.5"
version: "3.1.4"
uuid:
dependency: transitive
description:
... ... @@ -1197,10 +1197,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
url: "https://pub.dev"
source: hosted
version: "5.13.0"
version: "5.10.1"
xdg_directories:
dependency: transitive
description:
... ... @@ -1218,5 +1218,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.10.0 <4.0.0"
flutter: ">=3.38.0"
dart: ">=3.8.0-0 <4.0.0"
flutter: ">=3.27.0"
... ...