-
Notifications
You must be signed in to change notification settings - Fork 11
Handling response
Pablo Bautista edited this page May 31, 2020
·
4 revisions
All the responses (except for the API) returns a FlusmicResponse object containing a list of Documents in results params.
FlusmicResponse response = await flusmic.getRootDocument();
response.results //List of `Documents`Every document have a data property which is a Map<String, json> representing a pure json.
FlusmicResponse response = await flusmic.getRootDocument();
final firstResult = response.results.first;
firstResult.data //json object as `Map<String, dynamic>`If you want to create your own custom class to represent this data json object, you can take a look at the custom data section.