getUserId method Null safety

Future<String> getUserId()

Return the user id

Implementation

Future<String> getUserId() async {
  var userId = await storage.getUserId();
  if (userId == null) throw CacheException();
  return userId;
}