0 purchases
vcf dart
VCF Dart #
Features #
This library supports create and parse VCard files.
Tested versions #
2.1
3.0
4.0
Getting started #
Add this package to your dependency list:
dart pub add vcf_dart
copied to clipboard
Include into your project:
import 'package:vcf_dart/vcf_dart.dart';
copied to clipboard
Usage #
Parse the existing VCard file and print its content:
const localStr = """BEGIN:VCARD
VERSION:3.0
N:User;Test
FN:Test User
EMAIL;TYPE=HOME:[email protected]
END:VCARD""";
final stack = VCardStack.fromData(localStr);
print(stack.vcardStack);
copied to clipboard
For more examples, check the example folder.
Create an empty VCard stack and add a VCard element:
final stack = VCardStack();
final builder = VCardItemBuilder()
..addProperty(
const VCardProperty(
name: VConstants.name,
values: ['User', 'Test'],
),
)
..addPropertyFromEntry(
VConstants.formattedName,
'Test User',
)
..addProperty(
const VCardProperty(
name: VConstants.email,
nameParameters: [
VCardNameParameter(
VConstants.nameParamType,
VConstants.phoneTypeHome,
),
],
values: ['[email protected]'],
),
);
stack.items.add(builder.build());
copied to clipboard
TODO #
AGENT type support
Add more checks for invalid VCF files
Add more tests and examples
And more...
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.