Book class abstract

Available extensions
Annotations
  • @freezed

Constructors

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})
const
factory
Book.fromJson(Map<String, dynamic> json)
factory

Properties

authors List<AuthorKey>
no setterinherited
copyWith → $BookCopyWith<Book>
Create a copy of Book with the given fields replaced by the non-null parameter values.
no setterinherited
covers List<int>?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isbn10 List<String>?
no setterinherited
isbn13 List<String>?
no setterinherited
key String
no setterinherited
numberOfPages int?
no setterinherited
publishDate String?
no setterinherited
publishers List<String>?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_Book value)) → TResult

Available on Book, provided by the BookPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_Book value)?) → TResult?

Available on Book, provided by the BookPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_Book value)?, {required TResult orElse()}) → TResult

Available on Book, provided by the BookPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String key, String title, String? publishDate, List<String>? publishers, int? numberOfPages, List<int>? covers, List<AuthorKey> authors, List<String>? isbn10, List<String>? isbn13)?, {required TResult orElse()}) → TResult

Available on Book, provided by the BookPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this Book to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String key, String title, String? publishDate, List<String>? publishers, int? numberOfPages, List<int>? covers, List<AuthorKey> authors, List<String>? isbn10, List<String>? isbn13)) → TResult

Available on Book, provided by the BookPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String key, String title, String? publishDate, List<String>? publishers, int? numberOfPages, List<int>? covers, List<AuthorKey> authors, List<String>? isbn10, List<String>? isbn13)?) → TResult?

Available on Book, provided by the BookPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited