SocialPostBody class

Constructors

SocialPostBody({String? channel, String? content, List<String> media = const [], int? scheduleAt, String? status})
Returns a new SocialPostBody instance.

Properties

channel ↔ String?
Channel is the network to publish to: x, facebook, instagram, linkedin, tiktok, youtube or threads. Omitted means x. Example: "x"
getter/setter pair
content ↔ String?
Content is the post's text. Required — an empty body is a 400 — and bounded at 8192 characters, comfortably above every network's own limit. Example: "Shipping today."
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
media ↔ List<String>
Media is the post's attached media as URLs, at most 10, each bounded at 1024 characters. Blank entries are dropped. Omitting it CLEARS any stored media.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheduleAt ↔ int?
ScheduleAt is when to publish, as a unix timestamp in SECONDS. 0 means unscheduled. A negative value is clamped to 0. It only matters for a post whose status is scheduled.
getter/setter pair
status ↔ String?
Status is the post's lifecycle state: draft, scheduled, published or failed. Omitted means draft. The transient publishing claim is never settable here — accepting it from a request would let a caller wedge or replay the guard that stops two publishers double-posting the same row.
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) → SocialPostBody?
Returns a new SocialPostBody instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<SocialPostBody>
mapFromJson(dynamic json) → Map<String, SocialPostBody>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<SocialPostBody>>

Constants

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