Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
40
lib/models/counter_qna_comment_model.dart
Normal file
40
lib/models/counter_qna_comment_model.dart
Normal file
@ -0,0 +1,40 @@
|
||||
class CounterCommentModel {
|
||||
CounterCommentModel({
|
||||
this.status,
|
||||
this.error,
|
||||
required this.data,
|
||||
});
|
||||
|
||||
final int? status;
|
||||
final bool? error;
|
||||
String? data;
|
||||
|
||||
factory CounterCommentModel.fromJson(Map<String, dynamic> json) =>
|
||||
CounterCommentModel(
|
||||
status: json["status"],
|
||||
error: json["error"],
|
||||
data: (json["data"]["count comment "]).toString(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"status": status,
|
||||
"error": error,
|
||||
"data": data,
|
||||
};
|
||||
}
|
||||
|
||||
// class CounterComment {
|
||||
// CounterComment({
|
||||
// this.countCommentQna,
|
||||
// });
|
||||
|
||||
// String? countCommentQna;
|
||||
|
||||
// factory CounterComment.fromJson(Map<String, dynamic> json) => CounterComment(
|
||||
// countCommentQna: json["count comment"],
|
||||
// );
|
||||
|
||||
// Map<String, dynamic> toJson() => {
|
||||
// "count comment": countCommentQna,
|
||||
// };
|
||||
// }
|
Reference in New Issue
Block a user