Now for some internet optimism.
at_contacts_flutter
A flutter plugin project for CRUD operations on contacts.
Getting Started
This plugin provides two screens:
Contacts
This lists the contacts. From this screen a new contact can be added. Also, an existing contact can be blocked or deleted.
Blocked Contacts
This screen lists the blocked contacts. It also gives the option to unblock a contact in it.
Sample usage
It is expected that the app will first create an AtClientService instance and authenticate an atsign.
The contacts service needs to be initialised with the atClient from the AtClientService, current atsign and the root server.
initializeContactsService(
clientSdkService.atClientServiceInstance.atClient, currentAtSign,
rootDomain: MixedConstants.ROOT_DOMAIN);
Navigating to the contacts or blocked contacts is done simply by using:
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => ContactsScreen(),
));
or
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => BlockedScreen(),
));
Libraries
- at_contacts_flutter
- desktop_screens/desktop_contacts_screen
- models/contact_base_model
- screens/blocked_screen
- screens/contacts_screen
- services/contact_service
- utils/colors
- utils/exposed_service
- utils/images
- utils/init_contacts_service
- utils/text_strings
- utils/text_styles
- widgets/add_contacts_dialog
- A popup to ask the
AtSignwhich is to be added - widgets/add_singular_contact_dialog
- widgets/blocked_user_card
- A list tile to display the blocked contact
takes in a
AtContactblocked user and displays it's name, atsign, profile picture and option to unblock the user - widgets/bottom_sheet
- A bottom sheet widget to diaplay the number of contacts selected from
contact list and what to do of that list on press of
Donetakes in @paramonPressedwhich defines what to be executed on press ofDone@paramselectedListis a ValueChanged function which return the selected contacts to be used outside of package. - widgets/circular_contacts
- widgets/contacts_initials
- widgets/custom_circle_avatar
- A customized circular avatar to display the profile picture with a small border
takes in @param
imagefor theasset image@paramsizeto define the size of the avatar @paramnonAssetif the image is coming over the network @parambyteImageto display the image from the netwok - widgets/custom_list_tile
- A custom list tile to display the contacts
takes in a function @param
onTapto define what happens on tap of the tile @paramonTrailingPressesto set the behaviour for trailing icon @paramasSelectionTileto toggle whether the tile is selectable to select contacts @paramcontactfor details of the contact @paramcontactServiceto get an instance ofAtContactsImpl - widgets/custom_search_field
- A search field to filter out the contacts
- widgets/error_screen
- widgets/horizontal_list_view