[READ ONLY MIRROR] Open Source TikTok alternative built on AT Protocol github.com/sprksocial/client
flutter atproto video dart
Something went wrong. Try again.
12345678910111213141516171819202122import 'package:freezed_annotation/freezed_annotation.dart';import 'package:spark/src/core/network/atproto/data/models/feed_models.dart';
part 'comment_state.freezed.dart';
@freezedabstract class CommentState with _$CommentState { const factory CommentState({ required ThreadViewPost thread, @Default(false) bool isVideoInitialized, @Default(false) bool isFirstImagePrecached, String? videoUrl, }) = _CommentState; const CommentState._();
// Derive isLiked from the viewer state bool get isLiked => thread.post.viewer?.like != null;
// Get the actual like count, potentially adjusted for optimistic UI updates int get likeCount => thread.post.likeCount ?? 0;}