sharedWith property
String?
get
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;
set
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
set sharedWith(String? sharedWithAtSign) {
if (sharedWithAtSign != null &&
sharedWithAtSign.isNotEmpty &&
(!sharedWithAtSign.startsWith('@'))) {
sharedWithAtSign = '@$sharedWithAtSign';
}
if (sharedWithAtSign.isNotNullOrEmpty &&
(isLocal == true || metadata.isPublic == true)) {
throw InvalidAtKeyException(
'isLocal or isPublic cannot be true when sharedWith is set');
}
_sharedWith = sharedWithAtSign?.toLowerCase();
}