CreatePost class

Implemented types
Annotations
  • @freezed

Constructors

CreatePost({required String title, @JsonKey.new(name: 'community_id') required int communityId, String? body, String? url, @JsonKey.new(name: 'nsfw') bool? nsfw, @JsonKey.new(name: 'language_id') int? languageId, required String auth, @JsonKey.new(name: 'honeypot') String? honeypot, @JsonKey.new(name: 'ai_generated') bool? aiGenerated, PostPoll? poll, PostEvent? event})
const
factory
CreatePost.fromJson(Map<String, dynamic> json)
factory

Properties

aiGenerated bool?
no setterinherited
auth String
no setterinherited
body String?
no setterinherited
communityId int
no setterinherited
copyWith → $CreatePostCopyWith<CreatePost>
Create a copy of CreatePost with the given fields replaced by the non-null parameter values.
no setterinherited
event PostEvent?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
honeypot String?
no setterinherited
httpMethod HttpMethod
The HTTP method for this request.
no setteroverride
isMultipart bool
Whether this query contains multipart files.
no setteroverride
languageId int?
no setterinherited
multipartFiles List<MultipartFile>?
Optional list of multipart files for the request.
no setteroverride
nsfw bool?
no setterinherited
path String
The API endpoint path (e.g., '/post', '/comment').
no setteroverride
poll PostPoll?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
no setterinherited
url String?
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
responseFactory(Map<String, dynamic> json) GetPostResponse
Deserializes the JSON response into the expected type.
override
toJson() Map<String, dynamic>
Serializes this CreatePost to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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