Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Future<Car> f1(String id) async {
- final response = await http.get(join(_url, 'cars/$id'));
- if (response.statusCode == 200) {
- return Car.fromMap(jsonDecode(response.body));
- }
- else {
- throw Exception('Erro ao executar função!');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement