import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:info_tren/api/common.dart'; import 'package:info_tren/models/stations_result.dart'; Future> get stations async { final result = await http.get(Uri.https(authority, 'v2/stations')); final data = jsonDecode(result.body) as List; return data.map((e) => StationsResult.fromJson(e)).toList(growable: false,); }