I am starting to learn flutter and was creating a contact management application.
I am using the 'contacts_service' package to get phone contacts on app load.
This return a
Future<Iterable<Contact>>
where Contact is defined in contacts_service.dart.
Contact has a toMap and fromMap function.
Calling the ContactsService.getContacts(); on every app load causes the app to load slowly. I was wondering what is to best way to cache this data. Cache manager packages are all aimed at http calls (atleast I couldn't find one for this). I tried to write manually to the temp folder. I am stuck at how to store the List in the file. Any help is appreciated.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.