getDocument method
- @Deprecated('Deprecated in version 0.6.0')
- String slugName, {
- required void onSuccess(),
- required void onError(
- SyneriseError error
(DEPRECATED) Please use generateDocument instead. This method generates the document that is defined for the provided slug.
Args:
slugName (String): The parameter slugName
is a string that represents the
name of a document slug that is being requested.
Implementation
@Deprecated('Deprecated in version 0.6.0')
Future<void> getDocument(String slugName,
{required void Function(Map<String, Object>) onSuccess,
required void Function(SyneriseError error) onError}) async {
SyneriseResult<Map<String, Object>> result =
await _methods.getDocument(slugName);
result.onSuccess((result) {
onSuccess(result);
}).onError((error) {
onError(error);
});
}