find method

Future<UserInfo> find(
  1. String id
)

Find a user by id

Implementation

Future<UserInfo> find(String id) async {
  if (_cacheUserInfo.containsKey(id)) return await _cacheUserInfo[id];

  final response = await dio.get('/account/info/$id');

  return _cacheUserInfo[id] = UserInfo.fromJson(response.data);
}