This MR adds a way to upload sample data to provide a way to test our app without using any plugins. The idea is to use the same data structures used by Whatsapp plugin to minimize the changes. This might be problematic when we decide to change the whatsapp plugin itself.
The idea is to read a list of json files from https://gitlab.memri.io/memri/sample-dataset repository and import them to the pod.
Summary of the high level changes:
- Added
sample_data.dart
which fetches a list of json files and creates respective objects. - Added an enum to switch between data sources in
project_provider
. -
Inbox
only shows Messages and MessageChannels withservice = whatsapp
.
Limitations:
- No way to clean up created data made by sample data.
- Data structure is coupled with Whatsapp plugin, some changes there might break this feature.