Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

json to dart

class Autogenerated {
  String foodOrderOption;
  String foodOrder;

  Autogenerated({this.foodOrderOption, this.foodOrder});

  Autogenerated.fromJson(Map<String, dynamic> json) {
    foodOrderOption = json['foodOrderOption'];
    foodOrder = json['foodOrder'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['foodOrderOption'] = this.foodOrderOption;
    data['foodOrder'] = this.foodOrder;
    return data;
  }
}
Source by jsontodart.com #
 
PREVIOUS NEXT
Tagged: #json #dart
ADD COMMENT
Topic
Name
6+9 =