SocialPost class

Constructors

SocialPost({String? accountId, String? channel, String? content, int? createdAt, String? error, String? externalId, String? id, List<String> media = const [], int? scheduleAt, String? status, int? updatedAt})
Returns a new SocialPost instance.

Properties

accountId ↔ String?
AccountID / ExternalID / Error are server-managed publish results, set only by the publish path (never by a client update): the account a post was published through, the provider's returned external post id (for reconciliation), and the last failure reason. Empty until a publish attempt lands. AccountID is the connected account the post went out through. Absent until a publish succeeds.
getter/setter pair
channel ↔ String?
Channel is the network this post targets: x, facebook, instagram, linkedin, tiktok, youtube or threads. It is the channel whose CONNECTED accounts a publish fans out to. Example: "x"
getter/setter pair
content ↔ String?
Content is the post's text, bounded at 8192 characters. Example: "Shipping today."
getter/setter pair
createdAt ↔ int?
CreatedAt is when the post was created, as a unix timestamp in seconds.
getter/setter pair
error ↔ String?
Error is why the last publish attempt failed, verbatim and bounded. Absent when no attempt has failed; cleared by a later success.
getter/setter pair
externalId ↔ String?
ExternalID is the id the network returned for the published post, which is what reconciles this row against the post on the network. Absent until a publish succeeds.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
id ↔ String?
ID is the post's identifier, minted on create and the id every later call addresses it by. Example: "post_91ab20"
getter/setter pair
media ↔ List<String>
Media is the post's attached media as a list of URLs (images today; the composer's URL field now, an S3 picker later, populate it). Stored as a JSON array in the media TEXT column and ALWAYS serialized as an array (never null), so a client can rely on media being present. Bounded at the write layer (normMedia in social.go): each URL clipped to maxField, the list to maxMedia.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheduleAt ↔ int?
ScheduleAt is when the post is due, as a unix timestamp in SECONDS. 0 means unscheduled. It is meaningful only while the status is scheduled — a scheduled post whose time has arrived is published by the scheduler.
getter/setter pair
status ↔ String?
Status is the post's lifecycle state: draft, scheduled, published or failed. A fifth, transient publishing state exists while a publish attempt holds the claim; it is never settable from a request and a caller sees it only if it reads a post mid-attempt.
getter/setter pair
updatedAt ↔ int?
UpdatedAt is when the post row last changed, as a unix timestamp in seconds. The listing is ordered by it, newest first.
getter/setter pair

Methods

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.
override

Operators

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

Static Methods

fromJson(dynamic value) → SocialPost?
Returns a new SocialPost instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<SocialPost>
mapFromJson(dynamic json) → Map<String, SocialPost>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<SocialPost>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.