upgrade sdk

This commit is contained in:
hrxiang
2021-09-14 17:33:19 +08:00
parent d11fdfa0f7
commit c53b119e60
12 changed files with 945 additions and 12 deletions

View File

@@ -47,6 +47,12 @@ class FriendshipManager {
.then((value) => _toList(value));
}
Future<List<dynamic>> getFriendListMap() {
return _channel
.invokeMethod('getFriendList', _buildParam({}))
.then((value) => _toListMap(value));
}
/// modify friend information, only [comment] can be modified
///
Future<dynamic> setFriendInfo({required UserInfo info}) {
@@ -131,6 +137,11 @@ class FriendshipManager {
return (list as List).map((e) => UserInfo.fromJson(e)).toList();
}
static List<dynamic> _toListMap(String? value) {
var list = _formatJson(value);
return list;
}
static UserInfo _toObj(String value) => UserInfo.fromJson(_formatJson(value));
static dynamic _formatJson(value) {