BlogEntry class

Modelo independiente para entradas de blog. Las reacciones (likes, comentarios) se manejan a través del Room asociado. El roomId se genera con el patrón: blog_{id}

Constructors

BlogEntry({String id = '', String ownerId = '', String profileName = '', String profileImgUrl = '', String title = '', String content = '', String thumbnailUrl = '', List<String> hashtags = const [], int createdTime = 0, int modifiedTime = 0, int publishedTime = 0, Position? position, String location = '', bool isDraft = true, bool isHidden = false, bool isCommentEnabled = true, String themeMode = 'dark', List<String> savedByProfiles = const [], int viewCount = 0, VerificationLevel? verificationLevel, String? legacyPostId, String slug = ''})
BlogEntry.createClone(BlogEntry entry)
BlogEntry.fromJSON(dynamic data)
BlogEntry.fromLegacyPost(dynamic post, {String titleDivider = '|||TITLE|||'})
Crea un BlogEntry a partir de un Post de tipo blogEntry (para migración).
factory

Properties

content ↔ String
getter/setter pair
createdTime ↔ int
getter/setter pair
estimatedReadTime → String
Estima el tiempo de lectura en minutos.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hashtags ↔ List<String>
getter/setter pair
id ↔ String
getter/setter pair
isCommentEnabled ↔ bool
getter/setter pair
isDraft ↔ bool
getter/setter pair
isHidden ↔ bool
getter/setter pair
isPublished → bool
Verifica si el blog está publicado.
no setter
legacyPostId ↔ String?
getter/setter pair
location ↔ String
getter/setter pair
modifiedTime ↔ int
getter/setter pair
ownerId ↔ String
getter/setter pair
position ↔ Position?
getter/setter pair
profileImgUrl ↔ String
getter/setter pair
profileName ↔ String
getter/setter pair
publishedTime ↔ int
getter/setter pair
roomId → String
Genera el roomId asociado a este blog.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
savedByProfiles ↔ List<String>
getter/setter pair
slug ↔ String
URL slug for vanity URLs (e.g., emxi.org/blog/mi-primer-articulo)
getter/setter pair
themeMode ↔ String
getter/setter pair
thumbnailUrl ↔ String
getter/setter pair
title ↔ String
getter/setter pair
verificationLevel ↔ VerificationLevel?
getter/setter pair
viewCount ↔ int
getter/setter pair
wordCount → int
Calcula el número de palabras del contenido.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFeedPost() → Map<String, dynamic>
Convierte este BlogEntry a un Post para mostrarlo en el feed/timeline. El caption del Post incluirá un preview del contenido. El referenceId apunta al BlogEntry original.
toJSON() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

generateSlug(String title) → String
Generates a URL-friendly slug from a title. "Mi primer articulo" → "mi-primer-articulo"