findById method

Future<DocumentDto> findById(
  1. String collection,
  2. String id
)

Implementation

Future<DocumentDto> findById(String collection, String id) async {
  final json = asJsonObject(
    await http.get(documentUrl(collection, id)),
    'A document',
  );
  return DocumentDto.fromJson(json);
}