Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make model class for complex json in flutter

class Photo{  final String id;  final String title;  final String url;  Photo({    this.id,    this.url,    this.title}) ;  factory Photo.fromJson(Map<String, dynamic> json){    return new Photo(      id: json['id'].toString(),      title: json['title'],      url: json['json'],    );  }}
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #model #class #complex #json #flutter
ADD COMMENT
Topic
Name
2+8 =