getCurrentUser method

Future<User> getCurrentUser()

Implementation

Future<dart_blocks.User> getCurrentUser() async {
  if (_currentUser.id != "") {
    return _currentUser;
  }
  var jsonCurrentUser = await _secureStorage.read(key: _currentUserKey);
  if (jsonCurrentUser != null && jsonCurrentUser != "") {
    _currentUser = dart_blocks.User.fromJson(jsonCurrentUser);
    return _currentUser;
  }
  return dart_blocks.User();
}