FAQ Database Discussion Community

Is {0:{“id”:1,…},{“id:2,…}} a other reprensation of a JSON list like [{”id“:1,…},{”id:2,…}]

I have a little dilema. I have a backend/Frontend Application that comunicates with a JSON based REST Api. The backend is written in PHP(Symfony/jmsserializer) and the Frontend in Dart The communication between these two has a little Problem. For most List Data the backend responds with a JSON like [{"id":1,...},{"id:2,....}]...

Can I force unoptimal logical condition checking?

Is it possble to change the whay the logical or || statement is executed in dart. For example. I have the functions foo() and boo() which have a return type of bool. If i write (foo() || boo()) ? /* A */ : /* B */; and foo() returns true...

Incompatibility between the Dart shelf and rpc packages? ('access-control-request-method' header)

There seems to be an incompatibility between the shelf and rpc packages. In rpc [0.4.1] config/api.dart: The handleHttpOptionsRequest expects the 'access-control-request-method' header to be a List: Future<HttpApiResponse> handleHttpOptionsRequest( ParsedHttpApiRequest request) async { var requestedHttpMethods = request.headers['access-control-request-method']; List<String> allowed = []; assert('OPTIONS'.allMatches(request.methodKey).length == 1); if (requestedHttpMethods != null) { requestedHttpMethods.forEach((httpMethod) {...

How to set callback when