Comment class

Comment.

Annotations
  • @immutable
  • @MappableClass()

Constructors

Comment({required int id, required int bookId, required User author, required DateTime date, required String body})
Creates comment.
const

Properties

author User
Comment author.
final
body String
Comment content.
final
bookId int
Book's ID associated with comment.
final
date DateTime
Comment post date.
final
hashCode int
The hash code for this object.
no setterinherited
id int
Comment ID.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
inherited
toMap() Map<String, dynamic>
inherited
toString() String
Returns comment body.
override

Operators

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

Static Properties

parse Comment Function(dynamic value)
Parses Comment instance from a given value.
no setter
parseJson Comment Function(String json)
Parses JSON string into Comment similarly to parse.
no setter
parseJsonList List<Comment> Function(String json)
Parses JSON string into List of Comment instances similarly to parseList.
no setter
parseList List<Comment> Function(dynamic value)
Parses List of Comment instances from a given value.
no setter