SocialPost class

A single social post inside a SocialTemplate.

Constructors

SocialPost({required String author, required String time, String? text, String? imageUrl, String? avatarUrl, int likes = 0, int comments = 0, int shares = 0, bool liked = false, VoidCallback? onLike, VoidCallback? onComment, VoidCallback? onShare})
const

Properties

author → String
Author name.
final
avatarUrl → String?
Author avatar URL.
final
comments → int
Comment count.
final
hashCode → int
The hash code for this object.
no setterinherited
imageUrl → String?
Post image URL.
final
liked → bool
Whether the current user liked the post.
final
likes → int
Like count.
final
onComment → VoidCallback?
Comment callback.
final
onLike → VoidCallback?
Like callback.
final
onShare → VoidCallback?
Share callback.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shares → int
Share count.
final
text → String?
Post body text.
final
time → String
Relative time label.
final

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