Post class
- Annotations
-
- @freezed
Constructors
-
Post({required int id, required String title, @JsonKey.new(name: 'ap_id') required String apId, required bool local, required bool nsfw, required bool deleted, required bool removed, @JsonKey.new(name: 'user_id') required int userId, @JsonKey.new(name: 'community_id') required int communityId, @JsonKey.new(name: 'language_id') int? languageId, String? body, String? url, @JsonKey.new(name: 'small_thumbnail_url') String? smallThumbnailUrl, @JsonKey.new(name: 'thumbnail_url') String? thumbnailUrl, @JsonKey.new(name: 'alt_text') String? altText, @JsonKey.new(name: 'image_details') WidthHeight? imageDetails, @JsonKey.new(name: 'published') required DateTime published, DateTime? updated, @JsonKey.new(name: 'ai_generated', defaultValue: false) required bool aiGenerated, bool? sticky, @JsonKey.new(name: 'instance_sticky') bool? instanceSticky, bool? locked, @JsonKey.new(name: 'post_type') PostType? postType, PostPoll? poll, PostEvent? event, @JsonKey.new(name: 'emoji_reactions') List<
Reactions> ? emojiReactions, @JsonKey.new(name: 'cross_posts') List<MiniCrossPosts> ? crossPosts, String? tags, String? flair}) -
constfactory
-
Post.fromJson(Map<
String, dynamic> json) -
factory
Properties
- aiGenerated → bool
-
no setterinherited
- altText → String?
-
no setterinherited
- apId → String
-
no setterinherited
- body → String?
-
no setterinherited
- communityId → int
-
no setterinherited
-
copyWith
→ $PostCopyWith<
Post> -
Create a copy of Post
with the given fields replaced by the non-null parameter values.
no setterinherited
-
crossPosts
→ List<
MiniCrossPosts> ? -
no setterinherited
- deleted → bool
-
no setterinherited
-
emojiReactions
→ List<
Reactions> ? -
no setterinherited
- event → PostEvent?
-
no setterinherited
- flair → String?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
no setterinherited
- imageDetails → WidthHeight?
-
no setterinherited
- instanceSticky → bool?
-
no setterinherited
- languageId → int?
-
no setterinherited
- local → bool
-
no setterinherited
- locked → bool?
-
no setterinherited
- nsfw → bool
-
no setterinherited
- poll → PostPoll?
-
no setterinherited
- postType → PostType?
-
no setterinherited
- published → DateTime
-
no setterinherited
- removed → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smallThumbnailUrl → String?
-
no setterinherited
- sticky → bool?
-
no setterinherited
-
no setterinherited
- thumbnailUrl → String?
-
no setterinherited
- title → String
-
no setterinherited
- updated → DateTime?
-
no setterinherited
- url → String?
-
no setterinherited
- userId → int
-
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Post to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited