Merge remote-tracking branch 'origin/dev' into cody/netwrok_SDK
# Conflicts: # apps/im_app/lib/features/chat/presentation/chat_db_test_view_model.dart # apps/im_app/lib/features/login/presentation/login_view_model.dart 修复逻辑漏洞,性能优化
This commit is contained in:
@@ -59,7 +59,15 @@ typedef OnEncryptRequest =
|
||||
///
|
||||
/// [responseData] 的实际类型取决于服务端响应格式:
|
||||
/// - 加密模式下通常是 base64 字符串
|
||||
/// - 非加密模式下是 `Map<String, dynamic>`
|
||||
/// - 非加密模式下是 `Map<String, dynamic>`(拦截器会自动跳过,不调用此回调)
|
||||
///
|
||||
/// 实现时建议做类型判断兜底,应对非预期的响应格式:
|
||||
/// ```dart
|
||||
/// onDecryptResponse: (data) async {
|
||||
/// if (data is! String) throw FormatException('Expected String, got ${data.runtimeType}');
|
||||
/// return jsonDecode(aesDecrypt(data));
|
||||
/// }
|
||||
/// ```
|
||||
typedef OnDecryptResponse =
|
||||
Future<Map<String, dynamic>> Function(Object responseData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user