loadCachedSelfInfo method

Future<UserInfo?> loadCachedSelfInfo()

从本地缓存恢复用户信息(断网 / 冷启动)

Implementation

Future<UserInfo?> loadCachedSelfInfo() async {
  final raw = await _store.getKv(LocalStorage.keyUserInfo);
  if (raw == null) return null;
  final map = parseJsonMap(raw);
  if (map == null) return null;
  _self = UserInfo.fromJson(map);
  return _self;
}