This problem appeared to me after implementing a search to the database, previously I had no problem, it worked well for me, but from one moment to another this problem appeared and I do not understand the problem.
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.2/lib/src/io_client.dart:31:9: Error: Expected an identifier, but got '..'. ..followRedirects = request.followRedirects
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.2/lib/src/io_client.dart:36:9: Error: The getter 'ioRequest' isn't defined for the class 'IOClient'. - 'IOClient' is from 'package:http/src/io_client.dart'
('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/http-0.12.2/lib/src/io_client.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'ioRequest'. var response = await stream.pipe(ioRequest) as HttpClientResponse; FAILURE: Build failed with an exception.
Where: Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'.
String mensaje = ""; String urldata="https://example/api/data.php";
Future<List> cargarCitas(String usuarioId, String mascotaId) async {
var usuario = usuarioId;
var mascota =mascotaId;
var preguntaData = "4";
final respuestacitas = await http.post(Uri.encodeFull(urldata), headers: {
"Content-Type": "application/json"
}, body: {
"usuario": usuario, "pregunta": preguntaData, "mascota": mascota,
});
if (respuestacitas.statusCode == 200) {
final cargarDayaReserva = jsonDecode(respuestacitas.body) as List;
reservaMascota = cargarDayaReserva.map((e) => ReservaData.fromJson(e)).toList(); return reservaMascota;
} else {
setState(() {
mensaje = "cannot connect to the database";
});
}
}
--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/37bb21ed-a438-4869-816a-53f953d751cdn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f31ff570-c91b-40e6-a711-d8fac0b75fbbn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/dc9f43a8-b53b-4fe0-a4ca-2c6e64921b38n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/f7beadfc-43fb-4bd8-aa70-23ab4acf1861n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/59bbc148-fcfa-4ee6-8567-4b36b7f3fbf9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/617adff6-e085-4afe-933d-ff7c3d842ae9n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/212fd090-a9ad-49ed-829f-fc32e689f0acn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/7ffa274c-b036-435d-95e9-ca0a7159cf2fn%40googlegroups.com.