Commit e277b5d1ff25839d25bad64ce7d026587ff401e6

Authored by 权海
1 parent cf089e8c

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

@@ -325,7 +325,7 @@ interface PlatformHostApi { @@ -325,7 +325,7 @@ interface PlatformHostApi {
325 */ 325 */
326 fun updateLoginInfo(jsonString: String, baseUrl: String) 326 fun updateLoginInfo(jsonString: String, baseUrl: String)
327 /** 设置好友显示到表盘 */ 327 /** 设置好友显示到表盘 */
328 - fun updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo) 328 + fun updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo?)
329 /** 刷新表盘 */ 329 /** 刷新表盘 */
330 fun refreshWatchSurface() 330 fun refreshWatchSurface()
331 /** 请求苹果登录 */ 331 /** 请求苹果登录 */
@@ -389,7 +389,7 @@ interface PlatformHostApi { @@ -389,7 +389,7 @@ interface PlatformHostApi {
389 if (api != null) { 389 if (api != null) {
390 channel.setMessageHandler { message, reply -> 390 channel.setMessageHandler { message, reply ->
391 val args = message as List<Any?> 391 val args = message as List<Any?>
392 - val otherInfoArg = args[0] as WatchAppOtherInfo 392 + val otherInfoArg = args[0] as WatchAppOtherInfo?
393 val wrapped: List<Any?> = try { 393 val wrapped: List<Any?> = try {
394 api.updateWatchOtherUserInfo(otherInfoArg) 394 api.updateWatchOtherUserInfo(otherInfoArg)
395 listOf(null) 395 listOf(null)
@@ -359,7 +359,7 @@ protocol PlatformHostApi { @@ -359,7 +359,7 @@ protocol PlatformHostApi {
359 /// baseUrl: 请求地址, https://api.doublefeel.cn 359 /// baseUrl: 请求地址, https://api.doublefeel.cn
360 func updateLoginInfo(jsonString: String, baseUrl: String) throws 360 func updateLoginInfo(jsonString: String, baseUrl: String) throws
361 /// 设置好友显示到表盘 361 /// 设置好友显示到表盘
362 - func updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo) throws 362 + func updateWatchOtherUserInfo(otherInfo: WatchAppOtherInfo?) throws
363 /// 刷新表盘 363 /// 刷新表盘
364 func refreshWatchSurface() throws 364 func refreshWatchSurface() throws
365 /// 请求苹果登录 365 /// 请求苹果登录
@@ -419,7 +419,7 @@ class PlatformHostApiSetup { @@ -419,7 +419,7 @@ class PlatformHostApiSetup {
419 if let api = api { 419 if let api = api {
420 updateWatchOtherUserInfoChannel.setMessageHandler { message, reply in 420 updateWatchOtherUserInfoChannel.setMessageHandler { message, reply in
421 let args = message as! [Any?] 421 let args = message as! [Any?]
422 - let otherInfoArg = args[0] as! WatchAppOtherInfo 422 + let otherInfoArg: WatchAppOtherInfo? = nilOrValue(args[0])
423 do { 423 do {
424 try api.updateWatchOtherUserInfo(otherInfo: otherInfoArg) 424 try api.updateWatchOtherUserInfo(otherInfo: otherInfoArg)
425 reply(wrapResult(nil)) 425 reply(wrapResult(nil))
@@ -409,7 +409,7 @@ class PlatformHostApi { @@ -409,7 +409,7 @@ class PlatformHostApi {
409 } 409 }
410 410
411 /// 设置好友显示到表盘 411 /// 设置好友显示到表盘
412 - Future<void> updateWatchOtherUserInfo(WatchAppOtherInfo otherInfo) async { 412 + Future<void> updateWatchOtherUserInfo(WatchAppOtherInfo? otherInfo) async {
413 final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.PlatformHostApi.updateWatchOtherUserInfo$pigeonVar_messageChannelSuffix'; 413 final String pigeonVar_channelName = 'dev.flutter.pigeon.doublefeel_flutter.PlatformHostApi.updateWatchOtherUserInfo$pigeonVar_messageChannelSuffix';
414 final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>( 414 final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
415 pigeonVar_channelName, 415 pigeonVar_channelName,
@@ -117,7 +117,7 @@ abstract class PlatformHostApi { @@ -117,7 +117,7 @@ abstract class PlatformHostApi {
117 void updateLoginInfo(String jsonString, String baseUrl); 117 void updateLoginInfo(String jsonString, String baseUrl);
118 118
119 /// 设置好友显示到表盘 119 /// 设置好友显示到表盘
120 - void updateWatchOtherUserInfo(WatchAppOtherInfo otherInfo); 120 + void updateWatchOtherUserInfo(WatchAppOtherInfo? otherInfo);
121 121
122 /// 刷新表盘 122 /// 刷新表盘
123 void refreshWatchSurface(); 123 void refreshWatchSurface();
@@ -1064,10 +1064,10 @@ packages: @@ -1064,10 +1064,10 @@ packages:
1064 dependency: transitive 1064 dependency: transitive
1065 description: 1065 description:
1066 name: url_launcher_linux 1066 name: url_launcher_linux
1067 - sha256: d5e14138b3bc193a0f63c10a53c94b91d399df0512b1f29b94a043db7482384a 1067 + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935"
1068 url: "https://pub.dev" 1068 url: "https://pub.dev"
1069 source: hosted 1069 source: hosted
1070 - version: "3.2.2" 1070 + version: "3.2.1"
1071 url_launcher_platform_interface: 1071 url_launcher_platform_interface:
1072 dependency: transitive 1072 dependency: transitive
1073 description: 1073 description:
@@ -1080,18 +1080,18 @@ packages: @@ -1080,18 +1080,18 @@ packages:
1080 dependency: transitive 1080 dependency: transitive
1081 description: 1081 description:
1082 name: url_launcher_web 1082 name: url_launcher_web
1083 - sha256: "85c81589622fbc87c1c683aaea164d3604a7777495a79d91e39ffcdec39ddb34" 1083 + sha256: "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2"
1084 url: "https://pub.dev" 1084 url: "https://pub.dev"
1085 source: hosted 1085 source: hosted
1086 - version: "2.4.3" 1086 + version: "2.4.1"
1087 url_launcher_windows: 1087 url_launcher_windows:
1088 dependency: transitive 1088 dependency: transitive
1089 description: 1089 description:
1090 name: url_launcher_windows 1090 name: url_launcher_windows
1091 - sha256: "712c70ab1b99744ff066053cbe3e80c73332b38d46e5e945c98689b2e66fc15f" 1091 + sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77"
1092 url: "https://pub.dev" 1092 url: "https://pub.dev"
1093 source: hosted 1093 source: hosted
1094 - version: "3.1.5" 1094 + version: "3.1.4"
1095 uuid: 1095 uuid:
1096 dependency: transitive 1096 dependency: transitive
1097 description: 1097 description:
@@ -1197,10 +1197,10 @@ packages: @@ -1197,10 +1197,10 @@ packages:
1197 dependency: transitive 1197 dependency: transitive
1198 description: 1198 description:
1199 name: win32 1199 name: win32
1200 - sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" 1200 + sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
1201 url: "https://pub.dev" 1201 url: "https://pub.dev"
1202 source: hosted 1202 source: hosted
1203 - version: "5.13.0" 1203 + version: "5.10.1"
1204 xdg_directories: 1204 xdg_directories:
1205 dependency: transitive 1205 dependency: transitive
1206 description: 1206 description:
@@ -1218,5 +1218,5 @@ packages: @@ -1218,5 +1218,5 @@ packages:
1218 source: hosted 1218 source: hosted
1219 version: "3.1.3" 1219 version: "3.1.3"
1220 sdks: 1220 sdks:
1221 - dart: ">=3.10.0 <4.0.0"  
1222 - flutter: ">=3.38.0" 1221 + dart: ">=3.8.0-0 <4.0.0"
  1222 + flutter: ">=3.27.0"