asnasd/lib/models/content/sticker.dart
Henry-Hiles 2041b81141
add toJson to all content models
Fixes a regression from the primary constructor content migration
2026-10-25 18:30:28 -04:00

19 lines
617 B
Dart

import "package:freezed_annotation/freezed_annotation.dart";
import "package:nexus/models/content/content.dart";
import "package:nexus/models/info/image.dart";
part "sticker.freezed.dart";
part "sticker.g.dart";
@Freezed(toJson: false, fromJson: false)
@JsonSerializable()
class const StickerContent({
required final String body,
required final ImageInfo info,
required final Uri url,
}) extends Content with _$StickerContent {
@override
Map<String, Object?> toJson() => _$StickerContentToJson(this);
factory StickerContent.fromJson(Map<String, Object?> json) =>
_$StickerContentFromJson(json);
}