You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
369 B
10 lines
369 B
3 years ago
|
import 'dart:convert';
|
||
|
|
||
|
import 'package:http/http.dart' as http;
|
||
|
import 'package:info_tren/api/common.dart';
|
||
|
import 'package:info_tren/models/station_data.dart';
|
||
|
|
||
|
Future<StationData> getStationData(String stationName) async {
|
||
|
final response = await http.get(Uri.https(authority, 'v2/station/$stationName'));
|
||
|
return StationData.fromJson(jsonDecode(response.body));
|
||
|
}
|