Handling response - PixelaGt/flusmic GitHub Wiki
Handling response
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.