toPlainText method
Implementation
String toPlainText() {
String tel = '';
if (telephone != null) {
for (VCardTelephone t in telephone!) {
tel += '${t.toPlainText(VCardVersion.v1)}\n';
}
}
String adr = '';
if (address != null) {
for (VCardAddress a in address!) {
adr += '${a.toPlainText(VCardVersion.v1)}\n';
}
}
String email = '';
if (emails != null) {
for (String e in emails!) {
email += 'EMAIL:$e\n';
}
}
return 'BEGIN:VCARD\n${version.toString()}\n${name.toPlainText()}\n${name.asFullName()}\n${organization != null ? '${organization!.toPlainText()}\n' : ''}${title != null ? 'TITLE:$title\n' : ''}${role != null ? 'ROLE:$role\n' : ''}${geo != null ? '${geo!.toPlainText()}\n' : ''}$tel$email$adr${url != null ? 'URL:$url\n' : ''}${revision != null ? 'REV:${revision!.toString()}\n' : ''}END:VCARD';
}