DraftPost class abstract
One of the posts that compose a draft.
- Available extensions
- Annotations
-
- @freezed
Constructors
-
DraftPost({@Default.new('app.bsky.draft.defs#draftPost') String $type, required String text, @UDraftPostLabelsConverter() UDraftPostLabels? labels, @DraftEmbedImageConverter() List<
DraftEmbedImage> ? embedImages, @DraftEmbedVideoConverter() List<DraftEmbedVideo> ? embedVideos, @DraftEmbedExternalConverter() List<DraftEmbedExternal> ? embedExternals, @DraftEmbedRecordConverter() List<DraftEmbedRecord> ? embedRecords, Map<String, dynamic> ? $unknown}) -
constfactory
-
DraftPost.fromJson(Map<
String, Object?> json) -
factory
Properties
- $type → String
-
no setterinherited
-
$unknown
→ Map<
String, dynamic> ? -
no setterinherited
-
copyWith
→ $DraftPostCopyWith<
DraftPost> -
Create a copy of DraftPost
with the given fields replaced by the non-null parameter values.
no setterinherited
-
embedExternals
→ List<
DraftEmbedExternal> ? -
no setterinherited
-
embedImages
→ List<
DraftEmbedImage> ? -
no setterinherited
-
embedRecords
→ List<
DraftEmbedRecord> ? -
no setterinherited
-
embedVideos
→ List<
DraftEmbedVideo> ? -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLabels → bool
-
Available on DraftPost, provided by the DraftPostExtension extension
no setter - hasNotLabels → bool
-
Available on DraftPost, provided by the DraftPostExtension extension
no setter - labels → UDraftPostLabels?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_DraftPost value)) → TResult -
Available on DraftPost, provided by the DraftPostPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_DraftPost value)?) → TResult? -
Available on DraftPost, provided by the DraftPostPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_DraftPost value)?, {required TResult orElse()}) → TResult -
Available on DraftPost, provided by the DraftPostPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String $type, String text, UDraftPostLabels? labels, List< DraftEmbedImage> ? embedImages, List<DraftEmbedVideo> ? embedVideos, List<DraftEmbedExternal> ? embedExternals, List<DraftEmbedRecord> ? embedRecords, Map<String, dynamic> ? $unknown)?, {required TResult orElse()}) → TResult -
Available on DraftPost, provided by the DraftPostPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this DraftPost to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String $type, String text, UDraftPostLabels? labels, List< DraftEmbedImage> ? embedImages, List<DraftEmbedVideo> ? embedVideos, List<DraftEmbedExternal> ? embedExternals, List<DraftEmbedRecord> ? embedRecords, Map<String, dynamic> ? $unknown)) → TResult -
Available on DraftPost, provided by the DraftPostPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String $type, String text, UDraftPostLabels? labels, List< DraftEmbedImage> ? embedImages, List<DraftEmbedVideo> ? embedVideos, List<DraftEmbedExternal> ? embedExternals, List<DraftEmbedRecord> ? embedRecords, Map<String, dynamic> ? $unknown)?) → TResult? -
Available on DraftPost, provided by the DraftPostPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
knownProps
→ const List<
String>