PostModel class

The model for a post.

This model is used to store information about a post, such as the user who created it, the date and time it was created, the body of the post, and the event linked to the post.

Annotations

Constructors

PostModel({String? userID, @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) DateTime? postDate, String? description, String? descriptionPlain, String? postID, String? event, @Default(false) bool approved, String? link, String? buttonText, @Default(false) bool isEdited})
const
factory
PostModel.fromJson(Map<String, dynamic> json)
factory
PostModel.fromJsonAndId(Map<String, dynamic> json, String id)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
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
toString() String
A string representation of this object.
inherited

Operators

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