forked from luiscib3r/todo
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luis Ciber
committed
Sep 6, 2021
1 parent
a145652
commit f36e4c0
Showing
4 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
Future<String> getContactPhoneNumber() async { | ||
// final contact = await FlutterContactPicker.pickPhoneContact(); | ||
import 'package:contact_picker/contact_picker.dart'; | ||
|
||
// return contact.phoneNumber | ||
// .toString() | ||
// .replaceAll('+53', '') | ||
// .replaceAll(' ', '') | ||
// .replaceAll(RegExp('([a-zA-Z])'), '') | ||
// .replaceAll('()', ''); | ||
final ContactPicker _contactPicker = ContactPicker(); | ||
|
||
return ''; | ||
Future<String?> getContactPhoneNumber() async { | ||
final contact = await _contactPicker.selectContact(); | ||
|
||
return contact?.phoneNumber | ||
.toString() | ||
.replaceAll('+53', '') | ||
.replaceAll(' ', '') | ||
.replaceAll(RegExp('([a-zA-Z])'), '') | ||
.replaceAll('()', '') | ||
.replaceAll('-', ''); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters