at_contacts_flutter 4.0.0
at_contacts_flutter: ^4.0.0 copied to clipboard
A Flutter plugin project to provide ease of managing contacts for an @sign using @platform.
Now for some internet optimism. #
at_contacts_flutter #
Introduction #
at_contacts_flutter library persists contacts across different @platform applications. This is a Flutter plugin project that provides an ease of managing contacts for an @sign built on the @platform.
Get Started #
To get a basic overview of the @protocol packages, Please visit the atsign docs.
A basic setup is required to use this package. Follow here to get started.
This plugin provides two screens:
Usage #
Initialize the contact services initially by calling initializeContactsService()
function.
@override
void initState() {
super.initState();
initializeContactsService(rootDomain: AppConstants.rootDomain);
}
- Dispose any dispose stream controllers of the pacakge from the app level.
@override
void dispose(){
disposeContactsControllers();
super.dispose();
}
- Get an atSign details.
TextButton(
onPressed: () async {
AtContact _userContact = await getAtSignDetails(_atSign);
print(_userContact);
},
child: Text('Get Details'),
),
- Get cached contact details
TextButton(
onPressed: () async {
AtContact? _userContact = await getCachedContactDetail(_atSign);
print(_userContact ?? 'No cached contact found');
},
child: Text('Get Cached Details'),
),
Contacts #
This lists the contacts. From this screen a new contact can be added. This screen is exposed from the library for displaying, adding, selecting and deleting Contacts.
- If the user wants to go to the contacts list screen, call
ContactsScreen()
Widget in Navigator.
TextButton(
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => ContactsScreen(),
),
);
},
child: Text('Contacts'),
),
Blocked Contacts #
This screen lists the blocked contacts. It also gives the option to unblock a contact in it.
- If the user wants to go to the block list screen, call
BlockedScreen()
Widget in Navigator.
TextButton(
onPressed: () async {
await Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => BlockedScreen(),
),
);
},
child: Text('Blocked List'),
),