Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error flutter/dart #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions lib/vcard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,43 @@ import 'vcard_formatter.dart';
/// vCard, Valery Colong, May 2019

class VCard {
VCard(
{this.anniversary,
this.birthday,
this.cellPhone,
this.email,
this.firstName,
this.formattedName,
this.gender,
this.homeAddress,
this.homeFax,
this.homePhone,
this.isOrganization,
this.jobTitle,
this.lastName,
this.logo,
this.middleName,
this.namePrefix,
this.nameSuffix,
this.nickname,
this.note,
this.organization,
this.otherEmail,
this.otherPhone,
this.pagerPhone,
this.photo,
this.role,
this.socialUrls,
this.source,
this.uid,
this.url,
this.version,
this.workAddress,
this.workEmail,
this.workFax,
this.workPhone,
this.workUrl});

/// Specifies a value that represents a persistent, globally unique identifier associated with the vCard
String uid;

Expand Down Expand Up @@ -61,7 +98,7 @@ class VCard {
String gender;

/// Home mailing address
MailingAddress homeAddress = MailingAddress('HOME');
MailingAddress homeAddress = MailingAddress(type: 'HOME');

/// Home phone
var homePhone;
Expand Down Expand Up @@ -101,7 +138,7 @@ class VCard {
String workUrl;

/// Work mailing address
MailingAddress workAddress = MailingAddress('WORK');
MailingAddress workAddress = MailingAddress(type: 'WORK');

/// Work phone
var workPhone;
Expand Down Expand Up @@ -194,6 +231,15 @@ class Photo {
}

class MailingAddress {
MailingAddress(
{this.label,
this.city,
this.countryRegion,
this.postalCode,
this.stateProvince,
this.street,
this.type});

/// Represents the actual text that should be put on the mailing label when delivering a physical package
String label = '';

Expand All @@ -213,6 +259,4 @@ class MailingAddress {
String countryRegion = '';

final String type;

MailingAddress(this.type);
}