import 'dart:convert'; import 'package:http/http.dart' as http; class PerfectureService{ static Future?> loadPerfectures() async { List perfs = []; String url = 'http://localhost:8100/api/perf/'; final response = await http.get(Uri.parse(url), headers: { 'Content-Type': 'application/json; charset=UTF-8', }, ); if (response.statusCode == 200) { perfs = json.decode(response.body); } return perfs; } }