how to read V Card file(contact number,name etc) in flutter without use string split
1,293
You can user VCard parser from https://pub.dev/packages/vcard_parser add to pubspec
dependencies:
vcard_parser: ^0.1.6
in code import
import 'package:vcard_parser/vcard_parser.dart';
Now
Map<String, Object> map = VcardParser(String VCardcontent).parse() ;
Author by
Admin
Updated on December 17, 2022Comments
-
Admin over 1 year
i try to read contacts number and name from this V Card file. i don't know,what is the proper any way to read .
i use string split method. but any other proper way to read this, please suggest
( V Card file image show here)
-
pskink about 4 years
String.splitMapJoin
/StringScanner
? but why to make your life harder if you already have easy solution? -
Admin about 4 yearsyes you are right,split string is good option. but i think may be another solution. that i don't know.. @ pskink
-
Admin about 4 yearsyes i use it already.but its so complex for separate and read all data.
-
pskink about 4 yearswhat is complex?
-
Admin about 4 yearsexample :- for Phone number get in TEL in work and home ,and same as address has two fields work and home. and same as other filed for iterate data.
-
-
Admin about 4 yearsThanks for response, but this library not define how they work. @Dev
-
Admin about 4 yearsIts work,but not so exact for read all data .work same as Split method.i was use it its get data like for email :- EMAIL;TYPE=INTERNET: {name: INTERNET, value: [email protected]},
-
Dev about 4 yearsbro this is the only available parser on pub as much as i know.
-
Admin about 4 yearsi agree with you.but i think may be these have another solution also..
-
Nikul Boharwal over 3 yearsHey have you get the solution for this stuff because I also get in stuck to read vCard file in flutter