init method

Future init(
  1. YimDataPreferences dataPreferences
)

Implementation

Future init(YimDataPreferences dataPreferences) async {
  _dataPreferences = dataPreferences;
  _token = _dataPreferences.getString(__tokenDataKey);
  _user = _dataPreferences.getModel<T>(__userInfoDataKey, () => modelCreater());
  if (isLogin) syncUserInfoFromServer();
}