getCurrentUser method

Future<CognitoUser?> getCurrentUser()

Implementation

Future<CognitoUser?> getCurrentUser() async {
  final lastAuthUser = await storage.getItem(lastUserKey);
  if (lastAuthUser != null) {
    return CognitoUser(lastAuthUser, this,
        storage: storage,
        clientSecret: _clientSecret,
        deviceName: _userAgent,
        analyticsMetadataParamsDecorator: _analyticsMetadataParamsDecorator);
  }

  return null;
}