커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4주차 과제 오류
[왕초보] 플러터(Flutter)로 시작하는 앱개발 종합반 v0
4주차
북마크
최*영
댓글
12
추천
0
조회수
10
조회수
10
답변 완료

제가 방금 질문을 올렸는데 답변 완료 버튼을 잘못 눌러서 다시 질문합니다..

book.dart 코드 전체 올려봅니다.

class Book {
  String id;
  String title;
  String subtitle;
  List authors;
  String publishedDate;
  String thumbnail; // 썸네일 이미지 링크
  String previewLink; // ListTile 을 눌렀을 때 이동하는 링크


  Book({
    required this.id,
    required this.title,
    required this.subtitle,
    required this.authors,
    required this.publishedDate,
    required this.thumbnail,
    required this.previewLink,
  });


  Map toJson() {
    return {
      "id": id,
      "title": title,
      "subtile": subtitle,
      "authors": authors,
      "publishedDate": publishedDate,
      "thumbnail": thumbnail,
      "previewLink": previewLink,
    };
  }


  factory Book.fromJson(json) {
    return Book(
      id: json['id'],
      title: json['title'],
      subtitle: json['subtitle'],
      authors: json['authors'],
      publishedDate: json['publishedDate'],
      thumbnail: json['thumbnail'],
      previewLink: json['previewLink'],
    );
  }
}



취소
 공유
취소
댓글 0
댓글 알림
나의얼굴