Line data Source code
1 : // GENERATED CODE - DO NOT MODIFY BY HAND 2 : 3 : part of 'user.dart'; 4 : 5 : // ************************************************************************** 6 : // JsonSerializableGenerator 7 : // ************************************************************************** 8 : 9 2 : User _$UserFromJson(Map json) { 10 2 : return User( 11 2 : id: json['id'] as String?, 12 4 : data: (json['data'] as Map?)?.map( 13 4 : (k, e) => MapEntry(k as String, e as Object), 14 : ), 15 2 : createdAt: json['created_at'] == null 16 : ? null 17 4 : : DateTime.parse(json['created_at'] as String), 18 2 : updatedAt: json['updated_at'] == null 19 : ? null 20 4 : : DateTime.parse(json['updated_at'] as String), 21 2 : followersCount: json['followers_count'] as int?, 22 2 : followingCount: json['following_count'] as int?, 23 : ); 24 : } 25 : 26 1 : Map<String, dynamic> _$UserToJson(User instance) { 27 1 : final val = <String, dynamic>{ 28 1 : 'id': instance.id, 29 1 : 'data': instance.data, 30 : }; 31 : 32 1 : void writeNotNull(String key, dynamic value) { 33 : if (value != null) { 34 0 : val[key] = value; 35 : } 36 : } 37 : 38 3 : writeNotNull('created_at', readonly(instance.createdAt)); 39 3 : writeNotNull('updated_at', readonly(instance.updatedAt)); 40 3 : writeNotNull('followers_count', readonly(instance.followersCount)); 41 3 : writeNotNull('following_count', readonly(instance.followingCount)); 42 : return val; 43 : }