getOne method

Future<Map<String, Object?>?> getOne(
  1. String path
)

GET de um único registro (data é um objeto). Usado por */get?id=.

Implementation

Future<Map<String, Object?>?> getOne(String path) async {
  final res = await http.get(Uri.parse('$baseUrl$path'));
  final data = _unwrap(res.body, res.statusCode);
  return data is Map ? data.cast<String, Object?>() : null;
}