TimelinePost class

A post of the timeline.

Annotations

Constructors

TimelinePost({required String id, required String creatorId, required String title, required String content, required int likes, required int reaction, required DateTime createdAt, required bool reactionEnabled, String? category, TimelinePosterUserModel? creator, List<String>? likedBy, List<TimelinePostReaction>? reactions, String? imageUrl, Uint8List? image, Map<String, dynamic> data = const {}})
const
TimelinePost.fromJson(String id, Map<String, dynamic> json)
factory

Properties

category → String?
The category of the post on which can be filtered.
final
content → String
The content of the post.
final
createdAt → DateTime
Post creation date.
final
creator → TimelinePosterUserModel?
The creator of the post. If null it isn't loaded yet.
final
creatorId → String
The unique identifier of the creator of the post.
final
data → Map<String, dynamic>
Option to add extra data to a timelinepost that won't be shown anywhere
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
The unique identifier of the post.
final
image → Uint8List?
The image of the post used for uploading.
final
imageUrl → String?
The url of the image of the post.
final
likedBy → List<String>?
The list of users who liked the post. If null it isn't loaded yet.
final
likes → int
The number of likes of the post.
final
reaction → int
The number of reaction of the post.
final
reactionEnabled → bool
If reacting is enabled on the post.
final
reactions → List<TimelinePostReaction>?
The list of reactions of the post. If null it isn't loaded yet.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
The title of the post.
final

Methods

copyWith({String? id, String? creatorId, TimelinePosterUserModel? creator, String? title, String? category, String? imageUrl, Uint8List? image, String? content, int? likes, List<String>? likedBy, int? reaction, List<TimelinePostReaction>? reactions, DateTime? createdAt, bool? reactionEnabled, Map<String, dynamic>? data}) → TimelinePost
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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