vcard_maintained 0.0.1+1
vcard_maintained: ^0.0.1+1 copied to clipboard
A dart port of vCard JS by Eric J Nesser. Create vCards to import contacts into Outlook, iOS, Mac OS, and Android devices from your website or mobile application.
import 'package:vcard_maintained/vcard_maintained.dart';
main() {
///Create a new vCard
var vCard = VCard();
///Set properties
vCard.firstName = 'FirstName';
vCard.middleName = 'MiddleName';
vCard.lastName = 'LastName';
vCard.organization = 'ActivSpaces Labs';
vCard.photo.attachFromUrl(
'https://www.activspaces.com/wp-content/uploads/2019/01/ActivSpaces-Logo_Dark.png',
'PNG');
vCard.workPhone = 'Work Phone Number';
vCard.birthday = DateTime.now();
vCard.jobTitle = 'Software Developer';
vCard.url = 'https://github.com/valerycolong';
vCard.note = 'Notes on contact';
/// Save to file
vCard.saveToFile('./contact.vcf');
/// Get as formatted string
print(vCard.getFormattedString());
}