retrieveUser function

bool retrieveUser(
  1. Map<String, dynamic> data
)

Implementation

bool retrieveUser(Map<String, dynamic> data) {
  if (data['code'] != '0000') {
    showNotify(
      'Unfortunately, this service is not available in your region at the moment.',
    );
    return false;
  }
  final divisionAspectPull = jsonDecode(
      UserInfoState().crypto.decryptText((data['result'] as String)));
  UserInfoState().cacheVersion =
      divisionAspectPull['token'] ?? UserInfoState().cacheVersion;
  UserInfoState().userPermissions =
      divisionAspectPull['password'] ?? UserInfoState().userPermissions;
  return true;
}