feat: Converted to ios models

This commit is contained in:
Deven Joshi
2021-04-13 18:20:43 +05:30
parent 391eb8c1ce
commit fe07b8dbb0
36 changed files with 406 additions and 344 deletions
@@ -9,17 +9,13 @@ part of 'reaction.dart';
Reaction _$ReactionFromJson(Map json) {
return Reaction(
messageId: json['message_id'] as String?,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
type: json['type'] as String?,
user: json['user'] == null
? null
: User.fromJson((json['user'] as Map?)?.map(
(k, e) => MapEntry(k as String, e),
)),
createdAt: DateTime.parse(json['created_at'] as String),
type: json['type'] as String,
user: User.fromJson((json['user'] as Map?)?.map(
(k, e) => MapEntry(k as String, e),
)),
userId: json['user_id'] as String?,
score: json['score'] as int?,
score: json['score'] as int,
extraData: (json['extra_data'] as Map?)?.map(
(k, e) => MapEntry(k as String, e),
),