// To parse this JSON data, do // // final collectionDto = collectionDtoFromJson(jsonString); import 'dart:convert'; import 'dart:typed_data'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'collection_dto.freezed.dart'; // part 'collection_dto.g.dart'; // CollectionDto collectionDtoFromJson(String str) => // CollectionDto.fromJson(json.decode(str)); // String collectionDtoToJson(CollectionDto data) => json.encode(data.toJson()); // class Uint8ListConverter implements JsonConverter?> { // const Uint8ListConverter(); // @override // Uint8List? fromJson(List? json) { // return json == null ? null : Uint8List.fromList(json); // } // @override // List? toJson(Uint8List? object) { // return object?.toList(); // } // } @Freezed(copyWith: true, equal: true, fromJson: false, toJson: false) abstract class CollectionDto with _$CollectionDto { const factory CollectionDto({ required String desc, required String title, required bool isPublic, Uint8List? avatar, }) = _CollectionDto; // factory CollectionDto.fromJson(Map json) => // _$CollectionDtoFromJson(json); }