sharedWith property

String? sharedWith

The 'recipient' part of an atProtocol key name. For example if the key is @bob:city.address.my_app@alice then sharedWith is @bob

Implementation

String? get sharedWith => _sharedWith;
void sharedWith=(String? sharedWithAtSign)

The 'recipient' part of an atProtocol key name. For example if the key is @bob:city.address.my_app@alice then sharedWith is @bob

Implementation

set sharedWith(String? sharedWithAtSign) {
  assertStartsWithAtIfNotEmpty(sharedWithAtSign);
  if (sharedWithAtSign.isNotNullOrEmpty &&
      (isLocal == true || metadata?.isPublic == true)) {
    throw InvalidAtKeyException(
        'isLocal or isPublic cannot be true when sharedWith is set');
  }
  _sharedWith = sharedWithAtSign?.toLowerCase();
}