Book constructor
const
Book({
- required String key,
- required String title,
- @JsonKey.new(name: 'publish_date') String? publishDate,
- List<
String> ? publishers, - @JsonKey.new(name: 'number_of_pages') int? numberOfPages,
- List<
int> ? covers, - @Default.new([]) List<
AuthorKey> authors, - @JsonKey.new(name: 'isbn_10') List<
String> ? isbn10, - @JsonKey.new(name: 'isbn_13') List<
String> ? isbn13,
Implementation
const factory Book({
required String key,
required String title,
@JsonKey(name: 'publish_date') String? publishDate,
List<String>? publishers,
@JsonKey(name: 'number_of_pages') int? numberOfPages,
List<int>? covers,
@Default([]) List<AuthorKey> authors,
@JsonKey(name: 'isbn_10') List<String>? isbn10,
@JsonKey(name: 'isbn_13') List<String>? isbn13,
}) = _Book;