joaopaulofcc

Untitled

Dec 19th, 2020
501
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   Future<Car> f1(String id) async {
  2.     final response = await http.get(join(_url, 'cars/$id'));
  3.  
  4.     if (response.statusCode == 200) {
  5.       return Car.fromMap(jsonDecode(response.body));
  6.     }
  7.     else {
  8.       throw Exception('Erro ao executar função!');
  9.     }
  10.   }
RAW Paste Data