Skip to content

Commit

Permalink
feat: Tambahkan property url_blur dan size_blur didalam class mod…
Browse files Browse the repository at this point in the history
…el track_user_response.dart

Sekalian update unit test-nya.
  • Loading branch information
CoderJava committed Sep 14, 2023
1 parent 5e929e0 commit 8574b0b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/feature/data/model/track_user/track_user_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,17 @@ class ItemFileTrackUserResponse extends Equatable {
final String? url;
@JsonKey(name: 'size')
final int? sizeInByte;
@JsonKey(name: 'url_blur')
final String? urlBlur;
@JsonKey(name: 'size_blur')
final int? sizeBlurInByte;

ItemFileTrackUserResponse({
required this.id,
required this.url,
required this.sizeInByte,
required this.urlBlur,
required this.sizeBlurInByte,
});

factory ItemFileTrackUserResponse.fromJson(Map<String, dynamic> json) => _$ItemFileTrackUserResponseFromJson(json);
Expand All @@ -122,10 +128,13 @@ class ItemFileTrackUserResponse extends Equatable {
id,
url,
sizeInByte,
urlBlur,
sizeBlurInByte,
];

@override
String toString() {
return 'ItemFileTrackUserResponse{id: $id, url: $url, sizeInByte: $sizeInByte}';
return 'ItemFileTrackUserResponse{id: $id, url: $url, sizeInByte: $sizeInByte, urlBlur: $urlBlur, '
'sizeBlurInByte: $sizeBlurInByte}';
}
}
4 changes: 3 additions & 1 deletion test/fixture/track_user_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
{
"id": 1,
"url": "testUrl",
"size": 1
"size": 1,
"url_blur": "testUrlBlur",
"size_blur": 1
}
]
}
Expand Down

0 comments on commit 8574b0b

Please sign in to comment.