June 2017
Intermediate to advanced
873 pages
18h 9m
English
This is a recipe for a client web app that sends a request to a web server. The request contains the form's data that is posted in the JSON format.
Look at the project post_form for the code.
Job in the Making toJSON and fromJSON methods in your class recipe from Chapter 4, Object Orientation. We keep the example short and simple, but add two new properties, posted and open. Have a look at the following code:class Job { String type; int salary; String company; DateTime posted; // date of publication of job bool open = true; // is job still vacant ? Job(this.type, this.salary, this.company, this.posted); // toJSON and fromJSON ...Read now
Unlock full access