Line data Source code
1 : import 'package:json_annotation/json_annotation.dart'; 2 : part 'assetmodel.g.dart'; 3 : 4 : @JsonSerializable(createFactory: true) 5 : class AssetModel { 6 : String uid; 7 : @JsonKey(name: 'created_at') 8 : String createdAt; 9 : @JsonKey(name: 'updated_at') 10 : String updatedAt; 11 : @JsonKey(name: 'created_by') 12 : String createdBy; 13 : @JsonKey(name: 'updated_by') 14 : String updatedBy; 15 : @JsonKey(name: 'content_type') 16 : String contentType; 17 : @JsonKey(name: 'file_size') 18 : String fileSize; 19 : List tags; 20 : String filename; 21 : String url; 22 : @JsonKey(name: '_version') 23 : int version; 24 : String title; 25 : Map<dynamic, dynamic> dimension; 26 : @JsonKey(name: 'publish_details') 27 : Map publishDetails; 28 1 : AssetModel( 29 : this.uid, 30 : this.createdAt, 31 : this.updatedAt, 32 : this.createdBy, 33 : this.updatedBy, 34 : this.contentType, 35 : this.fileSize, 36 : this.tags, 37 : this.filename, 38 : this.url, 39 : this.version, 40 : this.title, 41 : this.dimension, 42 : this.publishDetails); 43 1 : factory AssetModel.fromJson(Map<String, dynamic> json) => 44 1 : _$AssetModelFromJson(json); 45 0 : Map<String, dynamic> toJson() => _$AssetModelToJson(this); 46 : }