O'Reilly logo

Learning Dart by Ivo Balbaert, Dzenan Ridjanovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using JSON web services

In this section, we code a web server that communicates with our clients and runs the todo app; the todo data is sent to and from the web server in the JSON string format. Spiral s06 consists of a server and a client part. To run it, first start the server (lib/server/server.dart) in Dart Editor or from the console; it runs when you see in the server.dart tab in Dart Editor: Listening for GET and POST on http://127.0.0.1:8080.

(If it does not run, navigate to Run | Manage Launches.) Then start one or more clients (web/app.html) in Dartium. Locally, the client still saves the data in IndexedDB. Our screen has two new buttons:

  • To server: The client converts the the data to the JSON format and sends it to the server, where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required