getAtsign method

Atsign getAtsign()

Implementation

Atsign getAtsign() {
  var filepath = filePath!('');
  var name = path.basenameWithoutExtension(filepath);
  var atSign = name.replaceAll('_key', '');
  if (atSign == "@" || atSign.isEmpty) {
    throw FormatException("Failed to parse atsign from filePath");
  }
  return atSign.toAtsign();
}