Created
February 11, 2021 09:36
-
-
Save Abdulsametileri/3f664f95350a3babb3024e17cb7a9d25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:json_annotation/json_annotation.dart'; | |
part 'card_model.g.dart'; | |
@JsonSerializable(fieldRename: FieldRename.snake) | |
class CardModel { | |
String id; | |
String author; | |
int width; | |
int height; | |
String url; | |
String downloadUrl; | |
CardModel({ | |
this.id, | |
this.author, | |
this.width, | |
this.height, | |
this.url, | |
this.downloadUrl, | |
}); | |
CardModel fromJson(Map<String, Object> json) => _$CardModelFromJson(json); | |
factory CardModel.fromJson(Map<String, Object> json) => _$CardModelFromJson(json); | |
Map<String, Object> toJson() => _$CardModelToJson(this); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PaginationModel { | |
int page; | |
int limit; | |
PaginationModel({this.page, this.limit}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment