import 'dart:convert';
import 'package:http/http.dart' as http;

class EControlService {
  Future<List<dynamic>> getEControlData(
    double latitude,
    double longitude,
    String fuelType,
  ) async {
    // REST Service... URL
    String apiUrl =
        'https://api.e-control.at/sprit/1.0/search/gas-stations/by-address?latitude=$latitude&longitude=$longitude&fuelType=$fuelType&includeClosed=false';
    var response = await http.get(Uri.parse(apiUrl));
    print('${response.statusCode}');
    return jsonDecode(response.body);
  }
}
