accessLevelToString function

String accessLevelToString (
  1. CacheAccessLevel accessLevel
)

Returns a string representation of the given CacheAccessLevel.

Implementation

String accessLevelToString(CacheAccessLevel accessLevel) {
  switch (accessLevel) {
    case CacheAccessLevel.PRIVATE:
      return 'private';
    case CacheAccessLevel.PUBLIC:
      return 'public';
    default:
      throw ArgumentError('Unrecognized cache access level: $accessLevel');
  }
}