CognitoUserAttributeKey.parse constructor

CognitoUserAttributeKey.parse(
  1. String key
)

Parses the given Cognito attribute key.

Implementation

factory CognitoUserAttributeKey.parse(String key) {
  key = key.toLowerCase();
  return values.firstWhere(
    (attr) => attr.key == key,
    orElse: () => CognitoUserAttributeKey._(
      key,
      readOnly: !key.startsWith(customPrefix),
    ),
  );
}