Line data Source code
1 : // GENERATED CODE - DO NOT MODIFY BY HAND
2 : // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides
3 :
4 : part of 'richable.dart';
5 :
6 : // **************************************************************************
7 : // FreezedGenerator
8 : // **************************************************************************
9 :
10 0 : T _$identity<T>(T value) => value;
11 :
12 0 : final _privateConstructorUsedError = UnsupportedError(
13 : 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
14 :
15 1 : Richable _$RichableFromJson(Map<String, dynamic> json) {
16 1 : switch (json['type'] as String) {
17 1 : case 'heading1':
18 1 : return RichableHeading1.fromJson(json);
19 1 : case 'heading2':
20 1 : return RichableHeading2.fromJson(json);
21 1 : case 'heading3':
22 1 : return RichableHeading3.fromJson(json);
23 1 : case 'heading4':
24 1 : return RichableHeading4.fromJson(json);
25 1 : case 'heading5':
26 1 : return RichableHeading5.fromJson(json);
27 1 : case 'heading6':
28 1 : return RichableHeading6.fromJson(json);
29 1 : case 'paragraph':
30 1 : return RichableParagraph.fromJson(json);
31 1 : case 'list-item':
32 1 : return RichableListItem.fromJson(json);
33 1 : case 'o-list-item':
34 1 : return RichableOrderedListItem.fromJson(json);
35 1 : case 'image':
36 1 : return RichableImage.fromJson(json);
37 1 : case 'embed':
38 1 : return RichableEmbed.fromJson(json);
39 :
40 : default:
41 0 : throw FallThroughError();
42 : }
43 : }
44 :
45 : /// @nodoc
46 : class _$RichableTearOff {
47 7 : const _$RichableTearOff();
48 :
49 0 : RichableHeading1 heading1(
50 : {required List<Span> spans, required String text, required String type}) {
51 0 : return RichableHeading1(
52 : spans: spans,
53 : text: text,
54 : type: type,
55 : );
56 : }
57 :
58 0 : RichableHeading2 heading2(
59 : {required List<Span> spans, required String text, required String type}) {
60 0 : return RichableHeading2(
61 : spans: spans,
62 : text: text,
63 : type: type,
64 : );
65 : }
66 :
67 0 : RichableHeading3 heading3(
68 : {required List<Span> spans, required String text, required String type}) {
69 0 : return RichableHeading3(
70 : spans: spans,
71 : text: text,
72 : type: type,
73 : );
74 : }
75 :
76 0 : RichableHeading4 heading4(
77 : {required List<Span> spans, required String text, required String type}) {
78 0 : return RichableHeading4(
79 : spans: spans,
80 : text: text,
81 : type: type,
82 : );
83 : }
84 :
85 0 : RichableHeading5 heading5(
86 : {required List<Span> spans, required String text, required String type}) {
87 0 : return RichableHeading5(
88 : spans: spans,
89 : text: text,
90 : type: type,
91 : );
92 : }
93 :
94 0 : RichableHeading6 heading6(
95 : {required List<Span> spans, required String text, required String type}) {
96 0 : return RichableHeading6(
97 : spans: spans,
98 : text: text,
99 : type: type,
100 : );
101 : }
102 :
103 0 : RichableParagraph paragraph(
104 : {required List<Span> spans, required String text, required String type}) {
105 0 : return RichableParagraph(
106 : spans: spans,
107 : text: text,
108 : type: type,
109 : );
110 : }
111 :
112 0 : RichableListItem listItem(
113 : {required List<Span> spans, required String text, required String type}) {
114 0 : return RichableListItem(
115 : spans: spans,
116 : text: text,
117 : type: type,
118 : );
119 : }
120 :
121 0 : RichableOrderedListItem orderedListItem(
122 : {required List<Span> spans, required String text, required String type}) {
123 0 : return RichableOrderedListItem(
124 : spans: spans,
125 : text: text,
126 : type: type,
127 : );
128 : }
129 :
130 0 : RichableImage image(
131 : {String? alt,
132 : String? copyright,
133 : required Dimension dimensions,
134 : required String url}) {
135 0 : return RichableImage(
136 : alt: alt,
137 : copyright: copyright,
138 : dimensions: dimensions,
139 : url: url,
140 : );
141 : }
142 :
143 0 : RichableEmbed embed(
144 : {@JsonKey(name: 'oembed') required EmbedData info,
145 : required String type}) {
146 0 : return RichableEmbed(
147 : info: info,
148 : type: type,
149 : );
150 : }
151 :
152 0 : Richable fromJson(Map<String, Object> json) {
153 0 : return Richable.fromJson(json);
154 : }
155 : }
156 :
157 : /// @nodoc
158 : const $Richable = _$RichableTearOff();
159 :
160 : /// @nodoc
161 : mixin _$Richable {
162 0 : @optionalTypeArgs
163 : TResult when<TResult extends Object?>({
164 : required TResult Function(List<Span> spans, String text, String type)
165 : heading1,
166 : required TResult Function(List<Span> spans, String text, String type)
167 : heading2,
168 : required TResult Function(List<Span> spans, String text, String type)
169 : heading3,
170 : required TResult Function(List<Span> spans, String text, String type)
171 : heading4,
172 : required TResult Function(List<Span> spans, String text, String type)
173 : heading5,
174 : required TResult Function(List<Span> spans, String text, String type)
175 : heading6,
176 : required TResult Function(List<Span> spans, String text, String type)
177 : paragraph,
178 : required TResult Function(List<Span> spans, String text, String type)
179 : listItem,
180 : required TResult Function(List<Span> spans, String text, String type)
181 : orderedListItem,
182 : required TResult Function(
183 : String? alt, String? copyright, Dimension dimensions, String url)
184 : image,
185 : required TResult Function(
186 : @JsonKey(name: 'oembed') EmbedData info, String type)
187 : embed,
188 : }) =>
189 0 : throw _privateConstructorUsedError;
190 0 : @optionalTypeArgs
191 : TResult maybeWhen<TResult extends Object?>({
192 : TResult Function(List<Span> spans, String text, String type)? heading1,
193 : TResult Function(List<Span> spans, String text, String type)? heading2,
194 : TResult Function(List<Span> spans, String text, String type)? heading3,
195 : TResult Function(List<Span> spans, String text, String type)? heading4,
196 : TResult Function(List<Span> spans, String text, String type)? heading5,
197 : TResult Function(List<Span> spans, String text, String type)? heading6,
198 : TResult Function(List<Span> spans, String text, String type)? paragraph,
199 : TResult Function(List<Span> spans, String text, String type)? listItem,
200 : TResult Function(List<Span> spans, String text, String type)?
201 : orderedListItem,
202 : TResult Function(
203 : String? alt, String? copyright, Dimension dimensions, String url)?
204 : image,
205 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
206 : embed,
207 : required TResult orElse(),
208 : }) =>
209 0 : throw _privateConstructorUsedError;
210 0 : @optionalTypeArgs
211 : TResult map<TResult extends Object?>({
212 : required TResult Function(RichableHeading1 value) heading1,
213 : required TResult Function(RichableHeading2 value) heading2,
214 : required TResult Function(RichableHeading3 value) heading3,
215 : required TResult Function(RichableHeading4 value) heading4,
216 : required TResult Function(RichableHeading5 value) heading5,
217 : required TResult Function(RichableHeading6 value) heading6,
218 : required TResult Function(RichableParagraph value) paragraph,
219 : required TResult Function(RichableListItem value) listItem,
220 : required TResult Function(RichableOrderedListItem value) orderedListItem,
221 : required TResult Function(RichableImage value) image,
222 : required TResult Function(RichableEmbed value) embed,
223 : }) =>
224 0 : throw _privateConstructorUsedError;
225 0 : @optionalTypeArgs
226 : TResult maybeMap<TResult extends Object?>({
227 : TResult Function(RichableHeading1 value)? heading1,
228 : TResult Function(RichableHeading2 value)? heading2,
229 : TResult Function(RichableHeading3 value)? heading3,
230 : TResult Function(RichableHeading4 value)? heading4,
231 : TResult Function(RichableHeading5 value)? heading5,
232 : TResult Function(RichableHeading6 value)? heading6,
233 : TResult Function(RichableParagraph value)? paragraph,
234 : TResult Function(RichableListItem value)? listItem,
235 : TResult Function(RichableOrderedListItem value)? orderedListItem,
236 : TResult Function(RichableImage value)? image,
237 : TResult Function(RichableEmbed value)? embed,
238 : required TResult orElse(),
239 : }) =>
240 0 : throw _privateConstructorUsedError;
241 0 : Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
242 : }
243 :
244 : /// @nodoc
245 : abstract class $RichableCopyWith<$Res> {
246 : factory $RichableCopyWith(Richable value, $Res Function(Richable) then) =
247 : _$RichableCopyWithImpl<$Res>;
248 : }
249 :
250 : /// @nodoc
251 : class _$RichableCopyWithImpl<$Res> implements $RichableCopyWith<$Res> {
252 0 : _$RichableCopyWithImpl(this._value, this._then);
253 :
254 : final Richable _value;
255 : // ignore: unused_field
256 : final $Res Function(Richable) _then;
257 : }
258 :
259 : /// @nodoc
260 : abstract class $RichableHeading1CopyWith<$Res> {
261 : factory $RichableHeading1CopyWith(
262 : RichableHeading1 value, $Res Function(RichableHeading1) then) =
263 : _$RichableHeading1CopyWithImpl<$Res>;
264 : $Res call({List<Span> spans, String text, String type});
265 : }
266 :
267 : /// @nodoc
268 : class _$RichableHeading1CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
269 : implements $RichableHeading1CopyWith<$Res> {
270 0 : _$RichableHeading1CopyWithImpl(
271 : RichableHeading1 _value, $Res Function(RichableHeading1) _then)
272 0 : : super(_value, (v) => _then(v as RichableHeading1));
273 :
274 0 : @override
275 0 : RichableHeading1 get _value => super._value as RichableHeading1;
276 :
277 0 : @override
278 : $Res call({
279 : Object? spans = freezed,
280 : Object? text = freezed,
281 : Object? type = freezed,
282 : }) {
283 0 : return _then(RichableHeading1(
284 0 : spans: spans == freezed
285 0 : ? _value.spans
286 : : spans // ignore: cast_nullable_to_non_nullable
287 : as List<Span>,
288 0 : text: text == freezed
289 0 : ? _value.text
290 : : text // ignore: cast_nullable_to_non_nullable
291 : as String,
292 0 : type: type == freezed
293 0 : ? _value.type
294 : : type // ignore: cast_nullable_to_non_nullable
295 : as String,
296 : ));
297 : }
298 : }
299 :
300 : /// @nodoc
301 : @JsonSerializable()
302 : class _$RichableHeading1 implements RichableHeading1 {
303 1 : const _$RichableHeading1(
304 : {required this.spans, required this.text, required this.type});
305 :
306 1 : factory _$RichableHeading1.fromJson(Map<String, dynamic> json) =>
307 1 : _$_$RichableHeading1FromJson(json);
308 :
309 : @override
310 : final List<Span> spans;
311 : @override
312 : final String text;
313 : @override
314 : final String type;
315 :
316 0 : @override
317 : String toString() {
318 0 : return 'Richable.heading1(spans: $spans, text: $text, type: $type)';
319 : }
320 :
321 0 : @override
322 : bool operator ==(dynamic other) {
323 : return identical(this, other) ||
324 0 : (other is RichableHeading1 &&
325 0 : (identical(other.spans, spans) ||
326 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
327 0 : (identical(other.text, text) ||
328 0 : const DeepCollectionEquality().equals(other.text, text)) &&
329 0 : (identical(other.type, type) ||
330 0 : const DeepCollectionEquality().equals(other.type, type)));
331 : }
332 :
333 0 : @override
334 : int get hashCode =>
335 0 : runtimeType.hashCode ^
336 0 : const DeepCollectionEquality().hash(spans) ^
337 0 : const DeepCollectionEquality().hash(text) ^
338 0 : const DeepCollectionEquality().hash(type);
339 :
340 0 : @JsonKey(ignore: true)
341 : @override
342 : $RichableHeading1CopyWith<RichableHeading1> get copyWith =>
343 0 : _$RichableHeading1CopyWithImpl<RichableHeading1>(this, _$identity);
344 :
345 0 : @override
346 : @optionalTypeArgs
347 : TResult when<TResult extends Object?>({
348 : required TResult Function(List<Span> spans, String text, String type)
349 : heading1,
350 : required TResult Function(List<Span> spans, String text, String type)
351 : heading2,
352 : required TResult Function(List<Span> spans, String text, String type)
353 : heading3,
354 : required TResult Function(List<Span> spans, String text, String type)
355 : heading4,
356 : required TResult Function(List<Span> spans, String text, String type)
357 : heading5,
358 : required TResult Function(List<Span> spans, String text, String type)
359 : heading6,
360 : required TResult Function(List<Span> spans, String text, String type)
361 : paragraph,
362 : required TResult Function(List<Span> spans, String text, String type)
363 : listItem,
364 : required TResult Function(List<Span> spans, String text, String type)
365 : orderedListItem,
366 : required TResult Function(
367 : String? alt, String? copyright, Dimension dimensions, String url)
368 : image,
369 : required TResult Function(
370 : @JsonKey(name: 'oembed') EmbedData info, String type)
371 : embed,
372 : }) {
373 0 : return heading1(spans, text, type);
374 : }
375 :
376 0 : @override
377 : @optionalTypeArgs
378 : TResult maybeWhen<TResult extends Object?>({
379 : TResult Function(List<Span> spans, String text, String type)? heading1,
380 : TResult Function(List<Span> spans, String text, String type)? heading2,
381 : TResult Function(List<Span> spans, String text, String type)? heading3,
382 : TResult Function(List<Span> spans, String text, String type)? heading4,
383 : TResult Function(List<Span> spans, String text, String type)? heading5,
384 : TResult Function(List<Span> spans, String text, String type)? heading6,
385 : TResult Function(List<Span> spans, String text, String type)? paragraph,
386 : TResult Function(List<Span> spans, String text, String type)? listItem,
387 : TResult Function(List<Span> spans, String text, String type)?
388 : orderedListItem,
389 : TResult Function(
390 : String? alt, String? copyright, Dimension dimensions, String url)?
391 : image,
392 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
393 : embed,
394 : required TResult orElse(),
395 : }) {
396 : if (heading1 != null) {
397 0 : return heading1(spans, text, type);
398 : }
399 0 : return orElse();
400 : }
401 :
402 0 : @override
403 : @optionalTypeArgs
404 : TResult map<TResult extends Object?>({
405 : required TResult Function(RichableHeading1 value) heading1,
406 : required TResult Function(RichableHeading2 value) heading2,
407 : required TResult Function(RichableHeading3 value) heading3,
408 : required TResult Function(RichableHeading4 value) heading4,
409 : required TResult Function(RichableHeading5 value) heading5,
410 : required TResult Function(RichableHeading6 value) heading6,
411 : required TResult Function(RichableParagraph value) paragraph,
412 : required TResult Function(RichableListItem value) listItem,
413 : required TResult Function(RichableOrderedListItem value) orderedListItem,
414 : required TResult Function(RichableImage value) image,
415 : required TResult Function(RichableEmbed value) embed,
416 : }) {
417 0 : return heading1(this);
418 : }
419 :
420 0 : @override
421 : @optionalTypeArgs
422 : TResult maybeMap<TResult extends Object?>({
423 : TResult Function(RichableHeading1 value)? heading1,
424 : TResult Function(RichableHeading2 value)? heading2,
425 : TResult Function(RichableHeading3 value)? heading3,
426 : TResult Function(RichableHeading4 value)? heading4,
427 : TResult Function(RichableHeading5 value)? heading5,
428 : TResult Function(RichableHeading6 value)? heading6,
429 : TResult Function(RichableParagraph value)? paragraph,
430 : TResult Function(RichableListItem value)? listItem,
431 : TResult Function(RichableOrderedListItem value)? orderedListItem,
432 : TResult Function(RichableImage value)? image,
433 : TResult Function(RichableEmbed value)? embed,
434 : required TResult orElse(),
435 : }) {
436 : if (heading1 != null) {
437 0 : return heading1(this);
438 : }
439 0 : return orElse();
440 : }
441 :
442 0 : @override
443 : Map<String, dynamic> toJson() {
444 0 : return _$_$RichableHeading1ToJson(this)..['type'] = 'heading1';
445 : }
446 : }
447 :
448 : abstract class RichableHeading1 implements Richable {
449 : const factory RichableHeading1(
450 : {required List<Span> spans,
451 : required String text,
452 : required String type}) = _$RichableHeading1;
453 :
454 : factory RichableHeading1.fromJson(Map<String, dynamic> json) =
455 : _$RichableHeading1.fromJson;
456 :
457 0 : List<Span> get spans => throw _privateConstructorUsedError;
458 0 : String get text => throw _privateConstructorUsedError;
459 0 : String get type => throw _privateConstructorUsedError;
460 0 : @JsonKey(ignore: true)
461 : $RichableHeading1CopyWith<RichableHeading1> get copyWith =>
462 0 : throw _privateConstructorUsedError;
463 : }
464 :
465 : /// @nodoc
466 : abstract class $RichableHeading2CopyWith<$Res> {
467 : factory $RichableHeading2CopyWith(
468 : RichableHeading2 value, $Res Function(RichableHeading2) then) =
469 : _$RichableHeading2CopyWithImpl<$Res>;
470 : $Res call({List<Span> spans, String text, String type});
471 : }
472 :
473 : /// @nodoc
474 : class _$RichableHeading2CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
475 : implements $RichableHeading2CopyWith<$Res> {
476 0 : _$RichableHeading2CopyWithImpl(
477 : RichableHeading2 _value, $Res Function(RichableHeading2) _then)
478 0 : : super(_value, (v) => _then(v as RichableHeading2));
479 :
480 0 : @override
481 0 : RichableHeading2 get _value => super._value as RichableHeading2;
482 :
483 0 : @override
484 : $Res call({
485 : Object? spans = freezed,
486 : Object? text = freezed,
487 : Object? type = freezed,
488 : }) {
489 0 : return _then(RichableHeading2(
490 0 : spans: spans == freezed
491 0 : ? _value.spans
492 : : spans // ignore: cast_nullable_to_non_nullable
493 : as List<Span>,
494 0 : text: text == freezed
495 0 : ? _value.text
496 : : text // ignore: cast_nullable_to_non_nullable
497 : as String,
498 0 : type: type == freezed
499 0 : ? _value.type
500 : : type // ignore: cast_nullable_to_non_nullable
501 : as String,
502 : ));
503 : }
504 : }
505 :
506 : /// @nodoc
507 : @JsonSerializable()
508 : class _$RichableHeading2 implements RichableHeading2 {
509 1 : const _$RichableHeading2(
510 : {required this.spans, required this.text, required this.type});
511 :
512 1 : factory _$RichableHeading2.fromJson(Map<String, dynamic> json) =>
513 1 : _$_$RichableHeading2FromJson(json);
514 :
515 : @override
516 : final List<Span> spans;
517 : @override
518 : final String text;
519 : @override
520 : final String type;
521 :
522 0 : @override
523 : String toString() {
524 0 : return 'Richable.heading2(spans: $spans, text: $text, type: $type)';
525 : }
526 :
527 0 : @override
528 : bool operator ==(dynamic other) {
529 : return identical(this, other) ||
530 0 : (other is RichableHeading2 &&
531 0 : (identical(other.spans, spans) ||
532 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
533 0 : (identical(other.text, text) ||
534 0 : const DeepCollectionEquality().equals(other.text, text)) &&
535 0 : (identical(other.type, type) ||
536 0 : const DeepCollectionEquality().equals(other.type, type)));
537 : }
538 :
539 0 : @override
540 : int get hashCode =>
541 0 : runtimeType.hashCode ^
542 0 : const DeepCollectionEquality().hash(spans) ^
543 0 : const DeepCollectionEquality().hash(text) ^
544 0 : const DeepCollectionEquality().hash(type);
545 :
546 0 : @JsonKey(ignore: true)
547 : @override
548 : $RichableHeading2CopyWith<RichableHeading2> get copyWith =>
549 0 : _$RichableHeading2CopyWithImpl<RichableHeading2>(this, _$identity);
550 :
551 0 : @override
552 : @optionalTypeArgs
553 : TResult when<TResult extends Object?>({
554 : required TResult Function(List<Span> spans, String text, String type)
555 : heading1,
556 : required TResult Function(List<Span> spans, String text, String type)
557 : heading2,
558 : required TResult Function(List<Span> spans, String text, String type)
559 : heading3,
560 : required TResult Function(List<Span> spans, String text, String type)
561 : heading4,
562 : required TResult Function(List<Span> spans, String text, String type)
563 : heading5,
564 : required TResult Function(List<Span> spans, String text, String type)
565 : heading6,
566 : required TResult Function(List<Span> spans, String text, String type)
567 : paragraph,
568 : required TResult Function(List<Span> spans, String text, String type)
569 : listItem,
570 : required TResult Function(List<Span> spans, String text, String type)
571 : orderedListItem,
572 : required TResult Function(
573 : String? alt, String? copyright, Dimension dimensions, String url)
574 : image,
575 : required TResult Function(
576 : @JsonKey(name: 'oembed') EmbedData info, String type)
577 : embed,
578 : }) {
579 0 : return heading2(spans, text, type);
580 : }
581 :
582 0 : @override
583 : @optionalTypeArgs
584 : TResult maybeWhen<TResult extends Object?>({
585 : TResult Function(List<Span> spans, String text, String type)? heading1,
586 : TResult Function(List<Span> spans, String text, String type)? heading2,
587 : TResult Function(List<Span> spans, String text, String type)? heading3,
588 : TResult Function(List<Span> spans, String text, String type)? heading4,
589 : TResult Function(List<Span> spans, String text, String type)? heading5,
590 : TResult Function(List<Span> spans, String text, String type)? heading6,
591 : TResult Function(List<Span> spans, String text, String type)? paragraph,
592 : TResult Function(List<Span> spans, String text, String type)? listItem,
593 : TResult Function(List<Span> spans, String text, String type)?
594 : orderedListItem,
595 : TResult Function(
596 : String? alt, String? copyright, Dimension dimensions, String url)?
597 : image,
598 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
599 : embed,
600 : required TResult orElse(),
601 : }) {
602 : if (heading2 != null) {
603 0 : return heading2(spans, text, type);
604 : }
605 0 : return orElse();
606 : }
607 :
608 0 : @override
609 : @optionalTypeArgs
610 : TResult map<TResult extends Object?>({
611 : required TResult Function(RichableHeading1 value) heading1,
612 : required TResult Function(RichableHeading2 value) heading2,
613 : required TResult Function(RichableHeading3 value) heading3,
614 : required TResult Function(RichableHeading4 value) heading4,
615 : required TResult Function(RichableHeading5 value) heading5,
616 : required TResult Function(RichableHeading6 value) heading6,
617 : required TResult Function(RichableParagraph value) paragraph,
618 : required TResult Function(RichableListItem value) listItem,
619 : required TResult Function(RichableOrderedListItem value) orderedListItem,
620 : required TResult Function(RichableImage value) image,
621 : required TResult Function(RichableEmbed value) embed,
622 : }) {
623 0 : return heading2(this);
624 : }
625 :
626 0 : @override
627 : @optionalTypeArgs
628 : TResult maybeMap<TResult extends Object?>({
629 : TResult Function(RichableHeading1 value)? heading1,
630 : TResult Function(RichableHeading2 value)? heading2,
631 : TResult Function(RichableHeading3 value)? heading3,
632 : TResult Function(RichableHeading4 value)? heading4,
633 : TResult Function(RichableHeading5 value)? heading5,
634 : TResult Function(RichableHeading6 value)? heading6,
635 : TResult Function(RichableParagraph value)? paragraph,
636 : TResult Function(RichableListItem value)? listItem,
637 : TResult Function(RichableOrderedListItem value)? orderedListItem,
638 : TResult Function(RichableImage value)? image,
639 : TResult Function(RichableEmbed value)? embed,
640 : required TResult orElse(),
641 : }) {
642 : if (heading2 != null) {
643 0 : return heading2(this);
644 : }
645 0 : return orElse();
646 : }
647 :
648 0 : @override
649 : Map<String, dynamic> toJson() {
650 0 : return _$_$RichableHeading2ToJson(this)..['type'] = 'heading2';
651 : }
652 : }
653 :
654 : abstract class RichableHeading2 implements Richable {
655 : const factory RichableHeading2(
656 : {required List<Span> spans,
657 : required String text,
658 : required String type}) = _$RichableHeading2;
659 :
660 : factory RichableHeading2.fromJson(Map<String, dynamic> json) =
661 : _$RichableHeading2.fromJson;
662 :
663 0 : List<Span> get spans => throw _privateConstructorUsedError;
664 0 : String get text => throw _privateConstructorUsedError;
665 0 : String get type => throw _privateConstructorUsedError;
666 0 : @JsonKey(ignore: true)
667 : $RichableHeading2CopyWith<RichableHeading2> get copyWith =>
668 0 : throw _privateConstructorUsedError;
669 : }
670 :
671 : /// @nodoc
672 : abstract class $RichableHeading3CopyWith<$Res> {
673 : factory $RichableHeading3CopyWith(
674 : RichableHeading3 value, $Res Function(RichableHeading3) then) =
675 : _$RichableHeading3CopyWithImpl<$Res>;
676 : $Res call({List<Span> spans, String text, String type});
677 : }
678 :
679 : /// @nodoc
680 : class _$RichableHeading3CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
681 : implements $RichableHeading3CopyWith<$Res> {
682 0 : _$RichableHeading3CopyWithImpl(
683 : RichableHeading3 _value, $Res Function(RichableHeading3) _then)
684 0 : : super(_value, (v) => _then(v as RichableHeading3));
685 :
686 0 : @override
687 0 : RichableHeading3 get _value => super._value as RichableHeading3;
688 :
689 0 : @override
690 : $Res call({
691 : Object? spans = freezed,
692 : Object? text = freezed,
693 : Object? type = freezed,
694 : }) {
695 0 : return _then(RichableHeading3(
696 0 : spans: spans == freezed
697 0 : ? _value.spans
698 : : spans // ignore: cast_nullable_to_non_nullable
699 : as List<Span>,
700 0 : text: text == freezed
701 0 : ? _value.text
702 : : text // ignore: cast_nullable_to_non_nullable
703 : as String,
704 0 : type: type == freezed
705 0 : ? _value.type
706 : : type // ignore: cast_nullable_to_non_nullable
707 : as String,
708 : ));
709 : }
710 : }
711 :
712 : /// @nodoc
713 : @JsonSerializable()
714 : class _$RichableHeading3 implements RichableHeading3 {
715 1 : const _$RichableHeading3(
716 : {required this.spans, required this.text, required this.type});
717 :
718 1 : factory _$RichableHeading3.fromJson(Map<String, dynamic> json) =>
719 1 : _$_$RichableHeading3FromJson(json);
720 :
721 : @override
722 : final List<Span> spans;
723 : @override
724 : final String text;
725 : @override
726 : final String type;
727 :
728 0 : @override
729 : String toString() {
730 0 : return 'Richable.heading3(spans: $spans, text: $text, type: $type)';
731 : }
732 :
733 0 : @override
734 : bool operator ==(dynamic other) {
735 : return identical(this, other) ||
736 0 : (other is RichableHeading3 &&
737 0 : (identical(other.spans, spans) ||
738 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
739 0 : (identical(other.text, text) ||
740 0 : const DeepCollectionEquality().equals(other.text, text)) &&
741 0 : (identical(other.type, type) ||
742 0 : const DeepCollectionEquality().equals(other.type, type)));
743 : }
744 :
745 0 : @override
746 : int get hashCode =>
747 0 : runtimeType.hashCode ^
748 0 : const DeepCollectionEquality().hash(spans) ^
749 0 : const DeepCollectionEquality().hash(text) ^
750 0 : const DeepCollectionEquality().hash(type);
751 :
752 0 : @JsonKey(ignore: true)
753 : @override
754 : $RichableHeading3CopyWith<RichableHeading3> get copyWith =>
755 0 : _$RichableHeading3CopyWithImpl<RichableHeading3>(this, _$identity);
756 :
757 0 : @override
758 : @optionalTypeArgs
759 : TResult when<TResult extends Object?>({
760 : required TResult Function(List<Span> spans, String text, String type)
761 : heading1,
762 : required TResult Function(List<Span> spans, String text, String type)
763 : heading2,
764 : required TResult Function(List<Span> spans, String text, String type)
765 : heading3,
766 : required TResult Function(List<Span> spans, String text, String type)
767 : heading4,
768 : required TResult Function(List<Span> spans, String text, String type)
769 : heading5,
770 : required TResult Function(List<Span> spans, String text, String type)
771 : heading6,
772 : required TResult Function(List<Span> spans, String text, String type)
773 : paragraph,
774 : required TResult Function(List<Span> spans, String text, String type)
775 : listItem,
776 : required TResult Function(List<Span> spans, String text, String type)
777 : orderedListItem,
778 : required TResult Function(
779 : String? alt, String? copyright, Dimension dimensions, String url)
780 : image,
781 : required TResult Function(
782 : @JsonKey(name: 'oembed') EmbedData info, String type)
783 : embed,
784 : }) {
785 0 : return heading3(spans, text, type);
786 : }
787 :
788 0 : @override
789 : @optionalTypeArgs
790 : TResult maybeWhen<TResult extends Object?>({
791 : TResult Function(List<Span> spans, String text, String type)? heading1,
792 : TResult Function(List<Span> spans, String text, String type)? heading2,
793 : TResult Function(List<Span> spans, String text, String type)? heading3,
794 : TResult Function(List<Span> spans, String text, String type)? heading4,
795 : TResult Function(List<Span> spans, String text, String type)? heading5,
796 : TResult Function(List<Span> spans, String text, String type)? heading6,
797 : TResult Function(List<Span> spans, String text, String type)? paragraph,
798 : TResult Function(List<Span> spans, String text, String type)? listItem,
799 : TResult Function(List<Span> spans, String text, String type)?
800 : orderedListItem,
801 : TResult Function(
802 : String? alt, String? copyright, Dimension dimensions, String url)?
803 : image,
804 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
805 : embed,
806 : required TResult orElse(),
807 : }) {
808 : if (heading3 != null) {
809 0 : return heading3(spans, text, type);
810 : }
811 0 : return orElse();
812 : }
813 :
814 0 : @override
815 : @optionalTypeArgs
816 : TResult map<TResult extends Object?>({
817 : required TResult Function(RichableHeading1 value) heading1,
818 : required TResult Function(RichableHeading2 value) heading2,
819 : required TResult Function(RichableHeading3 value) heading3,
820 : required TResult Function(RichableHeading4 value) heading4,
821 : required TResult Function(RichableHeading5 value) heading5,
822 : required TResult Function(RichableHeading6 value) heading6,
823 : required TResult Function(RichableParagraph value) paragraph,
824 : required TResult Function(RichableListItem value) listItem,
825 : required TResult Function(RichableOrderedListItem value) orderedListItem,
826 : required TResult Function(RichableImage value) image,
827 : required TResult Function(RichableEmbed value) embed,
828 : }) {
829 0 : return heading3(this);
830 : }
831 :
832 0 : @override
833 : @optionalTypeArgs
834 : TResult maybeMap<TResult extends Object?>({
835 : TResult Function(RichableHeading1 value)? heading1,
836 : TResult Function(RichableHeading2 value)? heading2,
837 : TResult Function(RichableHeading3 value)? heading3,
838 : TResult Function(RichableHeading4 value)? heading4,
839 : TResult Function(RichableHeading5 value)? heading5,
840 : TResult Function(RichableHeading6 value)? heading6,
841 : TResult Function(RichableParagraph value)? paragraph,
842 : TResult Function(RichableListItem value)? listItem,
843 : TResult Function(RichableOrderedListItem value)? orderedListItem,
844 : TResult Function(RichableImage value)? image,
845 : TResult Function(RichableEmbed value)? embed,
846 : required TResult orElse(),
847 : }) {
848 : if (heading3 != null) {
849 0 : return heading3(this);
850 : }
851 0 : return orElse();
852 : }
853 :
854 0 : @override
855 : Map<String, dynamic> toJson() {
856 0 : return _$_$RichableHeading3ToJson(this)..['type'] = 'heading3';
857 : }
858 : }
859 :
860 : abstract class RichableHeading3 implements Richable {
861 : const factory RichableHeading3(
862 : {required List<Span> spans,
863 : required String text,
864 : required String type}) = _$RichableHeading3;
865 :
866 : factory RichableHeading3.fromJson(Map<String, dynamic> json) =
867 : _$RichableHeading3.fromJson;
868 :
869 0 : List<Span> get spans => throw _privateConstructorUsedError;
870 0 : String get text => throw _privateConstructorUsedError;
871 0 : String get type => throw _privateConstructorUsedError;
872 0 : @JsonKey(ignore: true)
873 : $RichableHeading3CopyWith<RichableHeading3> get copyWith =>
874 0 : throw _privateConstructorUsedError;
875 : }
876 :
877 : /// @nodoc
878 : abstract class $RichableHeading4CopyWith<$Res> {
879 : factory $RichableHeading4CopyWith(
880 : RichableHeading4 value, $Res Function(RichableHeading4) then) =
881 : _$RichableHeading4CopyWithImpl<$Res>;
882 : $Res call({List<Span> spans, String text, String type});
883 : }
884 :
885 : /// @nodoc
886 : class _$RichableHeading4CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
887 : implements $RichableHeading4CopyWith<$Res> {
888 0 : _$RichableHeading4CopyWithImpl(
889 : RichableHeading4 _value, $Res Function(RichableHeading4) _then)
890 0 : : super(_value, (v) => _then(v as RichableHeading4));
891 :
892 0 : @override
893 0 : RichableHeading4 get _value => super._value as RichableHeading4;
894 :
895 0 : @override
896 : $Res call({
897 : Object? spans = freezed,
898 : Object? text = freezed,
899 : Object? type = freezed,
900 : }) {
901 0 : return _then(RichableHeading4(
902 0 : spans: spans == freezed
903 0 : ? _value.spans
904 : : spans // ignore: cast_nullable_to_non_nullable
905 : as List<Span>,
906 0 : text: text == freezed
907 0 : ? _value.text
908 : : text // ignore: cast_nullable_to_non_nullable
909 : as String,
910 0 : type: type == freezed
911 0 : ? _value.type
912 : : type // ignore: cast_nullable_to_non_nullable
913 : as String,
914 : ));
915 : }
916 : }
917 :
918 : /// @nodoc
919 : @JsonSerializable()
920 : class _$RichableHeading4 implements RichableHeading4 {
921 1 : const _$RichableHeading4(
922 : {required this.spans, required this.text, required this.type});
923 :
924 1 : factory _$RichableHeading4.fromJson(Map<String, dynamic> json) =>
925 1 : _$_$RichableHeading4FromJson(json);
926 :
927 : @override
928 : final List<Span> spans;
929 : @override
930 : final String text;
931 : @override
932 : final String type;
933 :
934 0 : @override
935 : String toString() {
936 0 : return 'Richable.heading4(spans: $spans, text: $text, type: $type)';
937 : }
938 :
939 0 : @override
940 : bool operator ==(dynamic other) {
941 : return identical(this, other) ||
942 0 : (other is RichableHeading4 &&
943 0 : (identical(other.spans, spans) ||
944 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
945 0 : (identical(other.text, text) ||
946 0 : const DeepCollectionEquality().equals(other.text, text)) &&
947 0 : (identical(other.type, type) ||
948 0 : const DeepCollectionEquality().equals(other.type, type)));
949 : }
950 :
951 0 : @override
952 : int get hashCode =>
953 0 : runtimeType.hashCode ^
954 0 : const DeepCollectionEquality().hash(spans) ^
955 0 : const DeepCollectionEquality().hash(text) ^
956 0 : const DeepCollectionEquality().hash(type);
957 :
958 0 : @JsonKey(ignore: true)
959 : @override
960 : $RichableHeading4CopyWith<RichableHeading4> get copyWith =>
961 0 : _$RichableHeading4CopyWithImpl<RichableHeading4>(this, _$identity);
962 :
963 0 : @override
964 : @optionalTypeArgs
965 : TResult when<TResult extends Object?>({
966 : required TResult Function(List<Span> spans, String text, String type)
967 : heading1,
968 : required TResult Function(List<Span> spans, String text, String type)
969 : heading2,
970 : required TResult Function(List<Span> spans, String text, String type)
971 : heading3,
972 : required TResult Function(List<Span> spans, String text, String type)
973 : heading4,
974 : required TResult Function(List<Span> spans, String text, String type)
975 : heading5,
976 : required TResult Function(List<Span> spans, String text, String type)
977 : heading6,
978 : required TResult Function(List<Span> spans, String text, String type)
979 : paragraph,
980 : required TResult Function(List<Span> spans, String text, String type)
981 : listItem,
982 : required TResult Function(List<Span> spans, String text, String type)
983 : orderedListItem,
984 : required TResult Function(
985 : String? alt, String? copyright, Dimension dimensions, String url)
986 : image,
987 : required TResult Function(
988 : @JsonKey(name: 'oembed') EmbedData info, String type)
989 : embed,
990 : }) {
991 0 : return heading4(spans, text, type);
992 : }
993 :
994 0 : @override
995 : @optionalTypeArgs
996 : TResult maybeWhen<TResult extends Object?>({
997 : TResult Function(List<Span> spans, String text, String type)? heading1,
998 : TResult Function(List<Span> spans, String text, String type)? heading2,
999 : TResult Function(List<Span> spans, String text, String type)? heading3,
1000 : TResult Function(List<Span> spans, String text, String type)? heading4,
1001 : TResult Function(List<Span> spans, String text, String type)? heading5,
1002 : TResult Function(List<Span> spans, String text, String type)? heading6,
1003 : TResult Function(List<Span> spans, String text, String type)? paragraph,
1004 : TResult Function(List<Span> spans, String text, String type)? listItem,
1005 : TResult Function(List<Span> spans, String text, String type)?
1006 : orderedListItem,
1007 : TResult Function(
1008 : String? alt, String? copyright, Dimension dimensions, String url)?
1009 : image,
1010 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
1011 : embed,
1012 : required TResult orElse(),
1013 : }) {
1014 : if (heading4 != null) {
1015 0 : return heading4(spans, text, type);
1016 : }
1017 0 : return orElse();
1018 : }
1019 :
1020 0 : @override
1021 : @optionalTypeArgs
1022 : TResult map<TResult extends Object?>({
1023 : required TResult Function(RichableHeading1 value) heading1,
1024 : required TResult Function(RichableHeading2 value) heading2,
1025 : required TResult Function(RichableHeading3 value) heading3,
1026 : required TResult Function(RichableHeading4 value) heading4,
1027 : required TResult Function(RichableHeading5 value) heading5,
1028 : required TResult Function(RichableHeading6 value) heading6,
1029 : required TResult Function(RichableParagraph value) paragraph,
1030 : required TResult Function(RichableListItem value) listItem,
1031 : required TResult Function(RichableOrderedListItem value) orderedListItem,
1032 : required TResult Function(RichableImage value) image,
1033 : required TResult Function(RichableEmbed value) embed,
1034 : }) {
1035 0 : return heading4(this);
1036 : }
1037 :
1038 0 : @override
1039 : @optionalTypeArgs
1040 : TResult maybeMap<TResult extends Object?>({
1041 : TResult Function(RichableHeading1 value)? heading1,
1042 : TResult Function(RichableHeading2 value)? heading2,
1043 : TResult Function(RichableHeading3 value)? heading3,
1044 : TResult Function(RichableHeading4 value)? heading4,
1045 : TResult Function(RichableHeading5 value)? heading5,
1046 : TResult Function(RichableHeading6 value)? heading6,
1047 : TResult Function(RichableParagraph value)? paragraph,
1048 : TResult Function(RichableListItem value)? listItem,
1049 : TResult Function(RichableOrderedListItem value)? orderedListItem,
1050 : TResult Function(RichableImage value)? image,
1051 : TResult Function(RichableEmbed value)? embed,
1052 : required TResult orElse(),
1053 : }) {
1054 : if (heading4 != null) {
1055 0 : return heading4(this);
1056 : }
1057 0 : return orElse();
1058 : }
1059 :
1060 0 : @override
1061 : Map<String, dynamic> toJson() {
1062 0 : return _$_$RichableHeading4ToJson(this)..['type'] = 'heading4';
1063 : }
1064 : }
1065 :
1066 : abstract class RichableHeading4 implements Richable {
1067 : const factory RichableHeading4(
1068 : {required List<Span> spans,
1069 : required String text,
1070 : required String type}) = _$RichableHeading4;
1071 :
1072 : factory RichableHeading4.fromJson(Map<String, dynamic> json) =
1073 : _$RichableHeading4.fromJson;
1074 :
1075 0 : List<Span> get spans => throw _privateConstructorUsedError;
1076 0 : String get text => throw _privateConstructorUsedError;
1077 0 : String get type => throw _privateConstructorUsedError;
1078 0 : @JsonKey(ignore: true)
1079 : $RichableHeading4CopyWith<RichableHeading4> get copyWith =>
1080 0 : throw _privateConstructorUsedError;
1081 : }
1082 :
1083 : /// @nodoc
1084 : abstract class $RichableHeading5CopyWith<$Res> {
1085 : factory $RichableHeading5CopyWith(
1086 : RichableHeading5 value, $Res Function(RichableHeading5) then) =
1087 : _$RichableHeading5CopyWithImpl<$Res>;
1088 : $Res call({List<Span> spans, String text, String type});
1089 : }
1090 :
1091 : /// @nodoc
1092 : class _$RichableHeading5CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
1093 : implements $RichableHeading5CopyWith<$Res> {
1094 0 : _$RichableHeading5CopyWithImpl(
1095 : RichableHeading5 _value, $Res Function(RichableHeading5) _then)
1096 0 : : super(_value, (v) => _then(v as RichableHeading5));
1097 :
1098 0 : @override
1099 0 : RichableHeading5 get _value => super._value as RichableHeading5;
1100 :
1101 0 : @override
1102 : $Res call({
1103 : Object? spans = freezed,
1104 : Object? text = freezed,
1105 : Object? type = freezed,
1106 : }) {
1107 0 : return _then(RichableHeading5(
1108 0 : spans: spans == freezed
1109 0 : ? _value.spans
1110 : : spans // ignore: cast_nullable_to_non_nullable
1111 : as List<Span>,
1112 0 : text: text == freezed
1113 0 : ? _value.text
1114 : : text // ignore: cast_nullable_to_non_nullable
1115 : as String,
1116 0 : type: type == freezed
1117 0 : ? _value.type
1118 : : type // ignore: cast_nullable_to_non_nullable
1119 : as String,
1120 : ));
1121 : }
1122 : }
1123 :
1124 : /// @nodoc
1125 : @JsonSerializable()
1126 : class _$RichableHeading5 implements RichableHeading5 {
1127 1 : const _$RichableHeading5(
1128 : {required this.spans, required this.text, required this.type});
1129 :
1130 1 : factory _$RichableHeading5.fromJson(Map<String, dynamic> json) =>
1131 1 : _$_$RichableHeading5FromJson(json);
1132 :
1133 : @override
1134 : final List<Span> spans;
1135 : @override
1136 : final String text;
1137 : @override
1138 : final String type;
1139 :
1140 0 : @override
1141 : String toString() {
1142 0 : return 'Richable.heading5(spans: $spans, text: $text, type: $type)';
1143 : }
1144 :
1145 0 : @override
1146 : bool operator ==(dynamic other) {
1147 : return identical(this, other) ||
1148 0 : (other is RichableHeading5 &&
1149 0 : (identical(other.spans, spans) ||
1150 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
1151 0 : (identical(other.text, text) ||
1152 0 : const DeepCollectionEquality().equals(other.text, text)) &&
1153 0 : (identical(other.type, type) ||
1154 0 : const DeepCollectionEquality().equals(other.type, type)));
1155 : }
1156 :
1157 0 : @override
1158 : int get hashCode =>
1159 0 : runtimeType.hashCode ^
1160 0 : const DeepCollectionEquality().hash(spans) ^
1161 0 : const DeepCollectionEquality().hash(text) ^
1162 0 : const DeepCollectionEquality().hash(type);
1163 :
1164 0 : @JsonKey(ignore: true)
1165 : @override
1166 : $RichableHeading5CopyWith<RichableHeading5> get copyWith =>
1167 0 : _$RichableHeading5CopyWithImpl<RichableHeading5>(this, _$identity);
1168 :
1169 0 : @override
1170 : @optionalTypeArgs
1171 : TResult when<TResult extends Object?>({
1172 : required TResult Function(List<Span> spans, String text, String type)
1173 : heading1,
1174 : required TResult Function(List<Span> spans, String text, String type)
1175 : heading2,
1176 : required TResult Function(List<Span> spans, String text, String type)
1177 : heading3,
1178 : required TResult Function(List<Span> spans, String text, String type)
1179 : heading4,
1180 : required TResult Function(List<Span> spans, String text, String type)
1181 : heading5,
1182 : required TResult Function(List<Span> spans, String text, String type)
1183 : heading6,
1184 : required TResult Function(List<Span> spans, String text, String type)
1185 : paragraph,
1186 : required TResult Function(List<Span> spans, String text, String type)
1187 : listItem,
1188 : required TResult Function(List<Span> spans, String text, String type)
1189 : orderedListItem,
1190 : required TResult Function(
1191 : String? alt, String? copyright, Dimension dimensions, String url)
1192 : image,
1193 : required TResult Function(
1194 : @JsonKey(name: 'oembed') EmbedData info, String type)
1195 : embed,
1196 : }) {
1197 0 : return heading5(spans, text, type);
1198 : }
1199 :
1200 0 : @override
1201 : @optionalTypeArgs
1202 : TResult maybeWhen<TResult extends Object?>({
1203 : TResult Function(List<Span> spans, String text, String type)? heading1,
1204 : TResult Function(List<Span> spans, String text, String type)? heading2,
1205 : TResult Function(List<Span> spans, String text, String type)? heading3,
1206 : TResult Function(List<Span> spans, String text, String type)? heading4,
1207 : TResult Function(List<Span> spans, String text, String type)? heading5,
1208 : TResult Function(List<Span> spans, String text, String type)? heading6,
1209 : TResult Function(List<Span> spans, String text, String type)? paragraph,
1210 : TResult Function(List<Span> spans, String text, String type)? listItem,
1211 : TResult Function(List<Span> spans, String text, String type)?
1212 : orderedListItem,
1213 : TResult Function(
1214 : String? alt, String? copyright, Dimension dimensions, String url)?
1215 : image,
1216 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
1217 : embed,
1218 : required TResult orElse(),
1219 : }) {
1220 : if (heading5 != null) {
1221 0 : return heading5(spans, text, type);
1222 : }
1223 0 : return orElse();
1224 : }
1225 :
1226 0 : @override
1227 : @optionalTypeArgs
1228 : TResult map<TResult extends Object?>({
1229 : required TResult Function(RichableHeading1 value) heading1,
1230 : required TResult Function(RichableHeading2 value) heading2,
1231 : required TResult Function(RichableHeading3 value) heading3,
1232 : required TResult Function(RichableHeading4 value) heading4,
1233 : required TResult Function(RichableHeading5 value) heading5,
1234 : required TResult Function(RichableHeading6 value) heading6,
1235 : required TResult Function(RichableParagraph value) paragraph,
1236 : required TResult Function(RichableListItem value) listItem,
1237 : required TResult Function(RichableOrderedListItem value) orderedListItem,
1238 : required TResult Function(RichableImage value) image,
1239 : required TResult Function(RichableEmbed value) embed,
1240 : }) {
1241 0 : return heading5(this);
1242 : }
1243 :
1244 0 : @override
1245 : @optionalTypeArgs
1246 : TResult maybeMap<TResult extends Object?>({
1247 : TResult Function(RichableHeading1 value)? heading1,
1248 : TResult Function(RichableHeading2 value)? heading2,
1249 : TResult Function(RichableHeading3 value)? heading3,
1250 : TResult Function(RichableHeading4 value)? heading4,
1251 : TResult Function(RichableHeading5 value)? heading5,
1252 : TResult Function(RichableHeading6 value)? heading6,
1253 : TResult Function(RichableParagraph value)? paragraph,
1254 : TResult Function(RichableListItem value)? listItem,
1255 : TResult Function(RichableOrderedListItem value)? orderedListItem,
1256 : TResult Function(RichableImage value)? image,
1257 : TResult Function(RichableEmbed value)? embed,
1258 : required TResult orElse(),
1259 : }) {
1260 : if (heading5 != null) {
1261 0 : return heading5(this);
1262 : }
1263 0 : return orElse();
1264 : }
1265 :
1266 0 : @override
1267 : Map<String, dynamic> toJson() {
1268 0 : return _$_$RichableHeading5ToJson(this)..['type'] = 'heading5';
1269 : }
1270 : }
1271 :
1272 : abstract class RichableHeading5 implements Richable {
1273 : const factory RichableHeading5(
1274 : {required List<Span> spans,
1275 : required String text,
1276 : required String type}) = _$RichableHeading5;
1277 :
1278 : factory RichableHeading5.fromJson(Map<String, dynamic> json) =
1279 : _$RichableHeading5.fromJson;
1280 :
1281 0 : List<Span> get spans => throw _privateConstructorUsedError;
1282 0 : String get text => throw _privateConstructorUsedError;
1283 0 : String get type => throw _privateConstructorUsedError;
1284 0 : @JsonKey(ignore: true)
1285 : $RichableHeading5CopyWith<RichableHeading5> get copyWith =>
1286 0 : throw _privateConstructorUsedError;
1287 : }
1288 :
1289 : /// @nodoc
1290 : abstract class $RichableHeading6CopyWith<$Res> {
1291 : factory $RichableHeading6CopyWith(
1292 : RichableHeading6 value, $Res Function(RichableHeading6) then) =
1293 : _$RichableHeading6CopyWithImpl<$Res>;
1294 : $Res call({List<Span> spans, String text, String type});
1295 : }
1296 :
1297 : /// @nodoc
1298 : class _$RichableHeading6CopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
1299 : implements $RichableHeading6CopyWith<$Res> {
1300 0 : _$RichableHeading6CopyWithImpl(
1301 : RichableHeading6 _value, $Res Function(RichableHeading6) _then)
1302 0 : : super(_value, (v) => _then(v as RichableHeading6));
1303 :
1304 0 : @override
1305 0 : RichableHeading6 get _value => super._value as RichableHeading6;
1306 :
1307 0 : @override
1308 : $Res call({
1309 : Object? spans = freezed,
1310 : Object? text = freezed,
1311 : Object? type = freezed,
1312 : }) {
1313 0 : return _then(RichableHeading6(
1314 0 : spans: spans == freezed
1315 0 : ? _value.spans
1316 : : spans // ignore: cast_nullable_to_non_nullable
1317 : as List<Span>,
1318 0 : text: text == freezed
1319 0 : ? _value.text
1320 : : text // ignore: cast_nullable_to_non_nullable
1321 : as String,
1322 0 : type: type == freezed
1323 0 : ? _value.type
1324 : : type // ignore: cast_nullable_to_non_nullable
1325 : as String,
1326 : ));
1327 : }
1328 : }
1329 :
1330 : /// @nodoc
1331 : @JsonSerializable()
1332 : class _$RichableHeading6 implements RichableHeading6 {
1333 1 : const _$RichableHeading6(
1334 : {required this.spans, required this.text, required this.type});
1335 :
1336 1 : factory _$RichableHeading6.fromJson(Map<String, dynamic> json) =>
1337 1 : _$_$RichableHeading6FromJson(json);
1338 :
1339 : @override
1340 : final List<Span> spans;
1341 : @override
1342 : final String text;
1343 : @override
1344 : final String type;
1345 :
1346 0 : @override
1347 : String toString() {
1348 0 : return 'Richable.heading6(spans: $spans, text: $text, type: $type)';
1349 : }
1350 :
1351 0 : @override
1352 : bool operator ==(dynamic other) {
1353 : return identical(this, other) ||
1354 0 : (other is RichableHeading6 &&
1355 0 : (identical(other.spans, spans) ||
1356 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
1357 0 : (identical(other.text, text) ||
1358 0 : const DeepCollectionEquality().equals(other.text, text)) &&
1359 0 : (identical(other.type, type) ||
1360 0 : const DeepCollectionEquality().equals(other.type, type)));
1361 : }
1362 :
1363 0 : @override
1364 : int get hashCode =>
1365 0 : runtimeType.hashCode ^
1366 0 : const DeepCollectionEquality().hash(spans) ^
1367 0 : const DeepCollectionEquality().hash(text) ^
1368 0 : const DeepCollectionEquality().hash(type);
1369 :
1370 0 : @JsonKey(ignore: true)
1371 : @override
1372 : $RichableHeading6CopyWith<RichableHeading6> get copyWith =>
1373 0 : _$RichableHeading6CopyWithImpl<RichableHeading6>(this, _$identity);
1374 :
1375 0 : @override
1376 : @optionalTypeArgs
1377 : TResult when<TResult extends Object?>({
1378 : required TResult Function(List<Span> spans, String text, String type)
1379 : heading1,
1380 : required TResult Function(List<Span> spans, String text, String type)
1381 : heading2,
1382 : required TResult Function(List<Span> spans, String text, String type)
1383 : heading3,
1384 : required TResult Function(List<Span> spans, String text, String type)
1385 : heading4,
1386 : required TResult Function(List<Span> spans, String text, String type)
1387 : heading5,
1388 : required TResult Function(List<Span> spans, String text, String type)
1389 : heading6,
1390 : required TResult Function(List<Span> spans, String text, String type)
1391 : paragraph,
1392 : required TResult Function(List<Span> spans, String text, String type)
1393 : listItem,
1394 : required TResult Function(List<Span> spans, String text, String type)
1395 : orderedListItem,
1396 : required TResult Function(
1397 : String? alt, String? copyright, Dimension dimensions, String url)
1398 : image,
1399 : required TResult Function(
1400 : @JsonKey(name: 'oembed') EmbedData info, String type)
1401 : embed,
1402 : }) {
1403 0 : return heading6(spans, text, type);
1404 : }
1405 :
1406 0 : @override
1407 : @optionalTypeArgs
1408 : TResult maybeWhen<TResult extends Object?>({
1409 : TResult Function(List<Span> spans, String text, String type)? heading1,
1410 : TResult Function(List<Span> spans, String text, String type)? heading2,
1411 : TResult Function(List<Span> spans, String text, String type)? heading3,
1412 : TResult Function(List<Span> spans, String text, String type)? heading4,
1413 : TResult Function(List<Span> spans, String text, String type)? heading5,
1414 : TResult Function(List<Span> spans, String text, String type)? heading6,
1415 : TResult Function(List<Span> spans, String text, String type)? paragraph,
1416 : TResult Function(List<Span> spans, String text, String type)? listItem,
1417 : TResult Function(List<Span> spans, String text, String type)?
1418 : orderedListItem,
1419 : TResult Function(
1420 : String? alt, String? copyright, Dimension dimensions, String url)?
1421 : image,
1422 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
1423 : embed,
1424 : required TResult orElse(),
1425 : }) {
1426 : if (heading6 != null) {
1427 0 : return heading6(spans, text, type);
1428 : }
1429 0 : return orElse();
1430 : }
1431 :
1432 0 : @override
1433 : @optionalTypeArgs
1434 : TResult map<TResult extends Object?>({
1435 : required TResult Function(RichableHeading1 value) heading1,
1436 : required TResult Function(RichableHeading2 value) heading2,
1437 : required TResult Function(RichableHeading3 value) heading3,
1438 : required TResult Function(RichableHeading4 value) heading4,
1439 : required TResult Function(RichableHeading5 value) heading5,
1440 : required TResult Function(RichableHeading6 value) heading6,
1441 : required TResult Function(RichableParagraph value) paragraph,
1442 : required TResult Function(RichableListItem value) listItem,
1443 : required TResult Function(RichableOrderedListItem value) orderedListItem,
1444 : required TResult Function(RichableImage value) image,
1445 : required TResult Function(RichableEmbed value) embed,
1446 : }) {
1447 0 : return heading6(this);
1448 : }
1449 :
1450 0 : @override
1451 : @optionalTypeArgs
1452 : TResult maybeMap<TResult extends Object?>({
1453 : TResult Function(RichableHeading1 value)? heading1,
1454 : TResult Function(RichableHeading2 value)? heading2,
1455 : TResult Function(RichableHeading3 value)? heading3,
1456 : TResult Function(RichableHeading4 value)? heading4,
1457 : TResult Function(RichableHeading5 value)? heading5,
1458 : TResult Function(RichableHeading6 value)? heading6,
1459 : TResult Function(RichableParagraph value)? paragraph,
1460 : TResult Function(RichableListItem value)? listItem,
1461 : TResult Function(RichableOrderedListItem value)? orderedListItem,
1462 : TResult Function(RichableImage value)? image,
1463 : TResult Function(RichableEmbed value)? embed,
1464 : required TResult orElse(),
1465 : }) {
1466 : if (heading6 != null) {
1467 0 : return heading6(this);
1468 : }
1469 0 : return orElse();
1470 : }
1471 :
1472 0 : @override
1473 : Map<String, dynamic> toJson() {
1474 0 : return _$_$RichableHeading6ToJson(this)..['type'] = 'heading6';
1475 : }
1476 : }
1477 :
1478 : abstract class RichableHeading6 implements Richable {
1479 : const factory RichableHeading6(
1480 : {required List<Span> spans,
1481 : required String text,
1482 : required String type}) = _$RichableHeading6;
1483 :
1484 : factory RichableHeading6.fromJson(Map<String, dynamic> json) =
1485 : _$RichableHeading6.fromJson;
1486 :
1487 0 : List<Span> get spans => throw _privateConstructorUsedError;
1488 0 : String get text => throw _privateConstructorUsedError;
1489 0 : String get type => throw _privateConstructorUsedError;
1490 0 : @JsonKey(ignore: true)
1491 : $RichableHeading6CopyWith<RichableHeading6> get copyWith =>
1492 0 : throw _privateConstructorUsedError;
1493 : }
1494 :
1495 : /// @nodoc
1496 : abstract class $RichableParagraphCopyWith<$Res> {
1497 : factory $RichableParagraphCopyWith(
1498 : RichableParagraph value, $Res Function(RichableParagraph) then) =
1499 : _$RichableParagraphCopyWithImpl<$Res>;
1500 : $Res call({List<Span> spans, String text, String type});
1501 : }
1502 :
1503 : /// @nodoc
1504 : class _$RichableParagraphCopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
1505 : implements $RichableParagraphCopyWith<$Res> {
1506 0 : _$RichableParagraphCopyWithImpl(
1507 : RichableParagraph _value, $Res Function(RichableParagraph) _then)
1508 0 : : super(_value, (v) => _then(v as RichableParagraph));
1509 :
1510 0 : @override
1511 0 : RichableParagraph get _value => super._value as RichableParagraph;
1512 :
1513 0 : @override
1514 : $Res call({
1515 : Object? spans = freezed,
1516 : Object? text = freezed,
1517 : Object? type = freezed,
1518 : }) {
1519 0 : return _then(RichableParagraph(
1520 0 : spans: spans == freezed
1521 0 : ? _value.spans
1522 : : spans // ignore: cast_nullable_to_non_nullable
1523 : as List<Span>,
1524 0 : text: text == freezed
1525 0 : ? _value.text
1526 : : text // ignore: cast_nullable_to_non_nullable
1527 : as String,
1528 0 : type: type == freezed
1529 0 : ? _value.type
1530 : : type // ignore: cast_nullable_to_non_nullable
1531 : as String,
1532 : ));
1533 : }
1534 : }
1535 :
1536 : /// @nodoc
1537 : @JsonSerializable()
1538 : class _$RichableParagraph implements RichableParagraph {
1539 1 : const _$RichableParagraph(
1540 : {required this.spans, required this.text, required this.type});
1541 :
1542 1 : factory _$RichableParagraph.fromJson(Map<String, dynamic> json) =>
1543 1 : _$_$RichableParagraphFromJson(json);
1544 :
1545 : @override
1546 : final List<Span> spans;
1547 : @override
1548 : final String text;
1549 : @override
1550 : final String type;
1551 :
1552 0 : @override
1553 : String toString() {
1554 0 : return 'Richable.paragraph(spans: $spans, text: $text, type: $type)';
1555 : }
1556 :
1557 0 : @override
1558 : bool operator ==(dynamic other) {
1559 : return identical(this, other) ||
1560 0 : (other is RichableParagraph &&
1561 0 : (identical(other.spans, spans) ||
1562 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
1563 0 : (identical(other.text, text) ||
1564 0 : const DeepCollectionEquality().equals(other.text, text)) &&
1565 0 : (identical(other.type, type) ||
1566 0 : const DeepCollectionEquality().equals(other.type, type)));
1567 : }
1568 :
1569 0 : @override
1570 : int get hashCode =>
1571 0 : runtimeType.hashCode ^
1572 0 : const DeepCollectionEquality().hash(spans) ^
1573 0 : const DeepCollectionEquality().hash(text) ^
1574 0 : const DeepCollectionEquality().hash(type);
1575 :
1576 0 : @JsonKey(ignore: true)
1577 : @override
1578 : $RichableParagraphCopyWith<RichableParagraph> get copyWith =>
1579 0 : _$RichableParagraphCopyWithImpl<RichableParagraph>(this, _$identity);
1580 :
1581 0 : @override
1582 : @optionalTypeArgs
1583 : TResult when<TResult extends Object?>({
1584 : required TResult Function(List<Span> spans, String text, String type)
1585 : heading1,
1586 : required TResult Function(List<Span> spans, String text, String type)
1587 : heading2,
1588 : required TResult Function(List<Span> spans, String text, String type)
1589 : heading3,
1590 : required TResult Function(List<Span> spans, String text, String type)
1591 : heading4,
1592 : required TResult Function(List<Span> spans, String text, String type)
1593 : heading5,
1594 : required TResult Function(List<Span> spans, String text, String type)
1595 : heading6,
1596 : required TResult Function(List<Span> spans, String text, String type)
1597 : paragraph,
1598 : required TResult Function(List<Span> spans, String text, String type)
1599 : listItem,
1600 : required TResult Function(List<Span> spans, String text, String type)
1601 : orderedListItem,
1602 : required TResult Function(
1603 : String? alt, String? copyright, Dimension dimensions, String url)
1604 : image,
1605 : required TResult Function(
1606 : @JsonKey(name: 'oembed') EmbedData info, String type)
1607 : embed,
1608 : }) {
1609 0 : return paragraph(spans, text, type);
1610 : }
1611 :
1612 0 : @override
1613 : @optionalTypeArgs
1614 : TResult maybeWhen<TResult extends Object?>({
1615 : TResult Function(List<Span> spans, String text, String type)? heading1,
1616 : TResult Function(List<Span> spans, String text, String type)? heading2,
1617 : TResult Function(List<Span> spans, String text, String type)? heading3,
1618 : TResult Function(List<Span> spans, String text, String type)? heading4,
1619 : TResult Function(List<Span> spans, String text, String type)? heading5,
1620 : TResult Function(List<Span> spans, String text, String type)? heading6,
1621 : TResult Function(List<Span> spans, String text, String type)? paragraph,
1622 : TResult Function(List<Span> spans, String text, String type)? listItem,
1623 : TResult Function(List<Span> spans, String text, String type)?
1624 : orderedListItem,
1625 : TResult Function(
1626 : String? alt, String? copyright, Dimension dimensions, String url)?
1627 : image,
1628 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
1629 : embed,
1630 : required TResult orElse(),
1631 : }) {
1632 : if (paragraph != null) {
1633 0 : return paragraph(spans, text, type);
1634 : }
1635 0 : return orElse();
1636 : }
1637 :
1638 0 : @override
1639 : @optionalTypeArgs
1640 : TResult map<TResult extends Object?>({
1641 : required TResult Function(RichableHeading1 value) heading1,
1642 : required TResult Function(RichableHeading2 value) heading2,
1643 : required TResult Function(RichableHeading3 value) heading3,
1644 : required TResult Function(RichableHeading4 value) heading4,
1645 : required TResult Function(RichableHeading5 value) heading5,
1646 : required TResult Function(RichableHeading6 value) heading6,
1647 : required TResult Function(RichableParagraph value) paragraph,
1648 : required TResult Function(RichableListItem value) listItem,
1649 : required TResult Function(RichableOrderedListItem value) orderedListItem,
1650 : required TResult Function(RichableImage value) image,
1651 : required TResult Function(RichableEmbed value) embed,
1652 : }) {
1653 0 : return paragraph(this);
1654 : }
1655 :
1656 1 : @override
1657 : @optionalTypeArgs
1658 : TResult maybeMap<TResult extends Object?>({
1659 : TResult Function(RichableHeading1 value)? heading1,
1660 : TResult Function(RichableHeading2 value)? heading2,
1661 : TResult Function(RichableHeading3 value)? heading3,
1662 : TResult Function(RichableHeading4 value)? heading4,
1663 : TResult Function(RichableHeading5 value)? heading5,
1664 : TResult Function(RichableHeading6 value)? heading6,
1665 : TResult Function(RichableParagraph value)? paragraph,
1666 : TResult Function(RichableListItem value)? listItem,
1667 : TResult Function(RichableOrderedListItem value)? orderedListItem,
1668 : TResult Function(RichableImage value)? image,
1669 : TResult Function(RichableEmbed value)? embed,
1670 : required TResult orElse(),
1671 : }) {
1672 : if (paragraph != null) {
1673 1 : return paragraph(this);
1674 : }
1675 0 : return orElse();
1676 : }
1677 :
1678 0 : @override
1679 : Map<String, dynamic> toJson() {
1680 0 : return _$_$RichableParagraphToJson(this)..['type'] = 'paragraph';
1681 : }
1682 : }
1683 :
1684 : abstract class RichableParagraph implements Richable {
1685 : const factory RichableParagraph(
1686 : {required List<Span> spans,
1687 : required String text,
1688 : required String type}) = _$RichableParagraph;
1689 :
1690 : factory RichableParagraph.fromJson(Map<String, dynamic> json) =
1691 : _$RichableParagraph.fromJson;
1692 :
1693 0 : List<Span> get spans => throw _privateConstructorUsedError;
1694 0 : String get text => throw _privateConstructorUsedError;
1695 0 : String get type => throw _privateConstructorUsedError;
1696 0 : @JsonKey(ignore: true)
1697 : $RichableParagraphCopyWith<RichableParagraph> get copyWith =>
1698 0 : throw _privateConstructorUsedError;
1699 : }
1700 :
1701 : /// @nodoc
1702 : abstract class $RichableListItemCopyWith<$Res> {
1703 : factory $RichableListItemCopyWith(
1704 : RichableListItem value, $Res Function(RichableListItem) then) =
1705 : _$RichableListItemCopyWithImpl<$Res>;
1706 : $Res call({List<Span> spans, String text, String type});
1707 : }
1708 :
1709 : /// @nodoc
1710 : class _$RichableListItemCopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
1711 : implements $RichableListItemCopyWith<$Res> {
1712 0 : _$RichableListItemCopyWithImpl(
1713 : RichableListItem _value, $Res Function(RichableListItem) _then)
1714 0 : : super(_value, (v) => _then(v as RichableListItem));
1715 :
1716 0 : @override
1717 0 : RichableListItem get _value => super._value as RichableListItem;
1718 :
1719 0 : @override
1720 : $Res call({
1721 : Object? spans = freezed,
1722 : Object? text = freezed,
1723 : Object? type = freezed,
1724 : }) {
1725 0 : return _then(RichableListItem(
1726 0 : spans: spans == freezed
1727 0 : ? _value.spans
1728 : : spans // ignore: cast_nullable_to_non_nullable
1729 : as List<Span>,
1730 0 : text: text == freezed
1731 0 : ? _value.text
1732 : : text // ignore: cast_nullable_to_non_nullable
1733 : as String,
1734 0 : type: type == freezed
1735 0 : ? _value.type
1736 : : type // ignore: cast_nullable_to_non_nullable
1737 : as String,
1738 : ));
1739 : }
1740 : }
1741 :
1742 : /// @nodoc
1743 : @JsonSerializable()
1744 : @FreezedUnionValue('list-item')
1745 : class _$RichableListItem implements RichableListItem {
1746 1 : const _$RichableListItem(
1747 : {required this.spans, required this.text, required this.type});
1748 :
1749 1 : factory _$RichableListItem.fromJson(Map<String, dynamic> json) =>
1750 1 : _$_$RichableListItemFromJson(json);
1751 :
1752 : @override
1753 : final List<Span> spans;
1754 : @override
1755 : final String text;
1756 : @override
1757 : final String type;
1758 :
1759 0 : @override
1760 : String toString() {
1761 0 : return 'Richable.listItem(spans: $spans, text: $text, type: $type)';
1762 : }
1763 :
1764 0 : @override
1765 : bool operator ==(dynamic other) {
1766 : return identical(this, other) ||
1767 0 : (other is RichableListItem &&
1768 0 : (identical(other.spans, spans) ||
1769 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
1770 0 : (identical(other.text, text) ||
1771 0 : const DeepCollectionEquality().equals(other.text, text)) &&
1772 0 : (identical(other.type, type) ||
1773 0 : const DeepCollectionEquality().equals(other.type, type)));
1774 : }
1775 :
1776 0 : @override
1777 : int get hashCode =>
1778 0 : runtimeType.hashCode ^
1779 0 : const DeepCollectionEquality().hash(spans) ^
1780 0 : const DeepCollectionEquality().hash(text) ^
1781 0 : const DeepCollectionEquality().hash(type);
1782 :
1783 0 : @JsonKey(ignore: true)
1784 : @override
1785 : $RichableListItemCopyWith<RichableListItem> get copyWith =>
1786 0 : _$RichableListItemCopyWithImpl<RichableListItem>(this, _$identity);
1787 :
1788 0 : @override
1789 : @optionalTypeArgs
1790 : TResult when<TResult extends Object?>({
1791 : required TResult Function(List<Span> spans, String text, String type)
1792 : heading1,
1793 : required TResult Function(List<Span> spans, String text, String type)
1794 : heading2,
1795 : required TResult Function(List<Span> spans, String text, String type)
1796 : heading3,
1797 : required TResult Function(List<Span> spans, String text, String type)
1798 : heading4,
1799 : required TResult Function(List<Span> spans, String text, String type)
1800 : heading5,
1801 : required TResult Function(List<Span> spans, String text, String type)
1802 : heading6,
1803 : required TResult Function(List<Span> spans, String text, String type)
1804 : paragraph,
1805 : required TResult Function(List<Span> spans, String text, String type)
1806 : listItem,
1807 : required TResult Function(List<Span> spans, String text, String type)
1808 : orderedListItem,
1809 : required TResult Function(
1810 : String? alt, String? copyright, Dimension dimensions, String url)
1811 : image,
1812 : required TResult Function(
1813 : @JsonKey(name: 'oembed') EmbedData info, String type)
1814 : embed,
1815 : }) {
1816 0 : return listItem(spans, text, type);
1817 : }
1818 :
1819 0 : @override
1820 : @optionalTypeArgs
1821 : TResult maybeWhen<TResult extends Object?>({
1822 : TResult Function(List<Span> spans, String text, String type)? heading1,
1823 : TResult Function(List<Span> spans, String text, String type)? heading2,
1824 : TResult Function(List<Span> spans, String text, String type)? heading3,
1825 : TResult Function(List<Span> spans, String text, String type)? heading4,
1826 : TResult Function(List<Span> spans, String text, String type)? heading5,
1827 : TResult Function(List<Span> spans, String text, String type)? heading6,
1828 : TResult Function(List<Span> spans, String text, String type)? paragraph,
1829 : TResult Function(List<Span> spans, String text, String type)? listItem,
1830 : TResult Function(List<Span> spans, String text, String type)?
1831 : orderedListItem,
1832 : TResult Function(
1833 : String? alt, String? copyright, Dimension dimensions, String url)?
1834 : image,
1835 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
1836 : embed,
1837 : required TResult orElse(),
1838 : }) {
1839 : if (listItem != null) {
1840 0 : return listItem(spans, text, type);
1841 : }
1842 0 : return orElse();
1843 : }
1844 :
1845 0 : @override
1846 : @optionalTypeArgs
1847 : TResult map<TResult extends Object?>({
1848 : required TResult Function(RichableHeading1 value) heading1,
1849 : required TResult Function(RichableHeading2 value) heading2,
1850 : required TResult Function(RichableHeading3 value) heading3,
1851 : required TResult Function(RichableHeading4 value) heading4,
1852 : required TResult Function(RichableHeading5 value) heading5,
1853 : required TResult Function(RichableHeading6 value) heading6,
1854 : required TResult Function(RichableParagraph value) paragraph,
1855 : required TResult Function(RichableListItem value) listItem,
1856 : required TResult Function(RichableOrderedListItem value) orderedListItem,
1857 : required TResult Function(RichableImage value) image,
1858 : required TResult Function(RichableEmbed value) embed,
1859 : }) {
1860 0 : return listItem(this);
1861 : }
1862 :
1863 0 : @override
1864 : @optionalTypeArgs
1865 : TResult maybeMap<TResult extends Object?>({
1866 : TResult Function(RichableHeading1 value)? heading1,
1867 : TResult Function(RichableHeading2 value)? heading2,
1868 : TResult Function(RichableHeading3 value)? heading3,
1869 : TResult Function(RichableHeading4 value)? heading4,
1870 : TResult Function(RichableHeading5 value)? heading5,
1871 : TResult Function(RichableHeading6 value)? heading6,
1872 : TResult Function(RichableParagraph value)? paragraph,
1873 : TResult Function(RichableListItem value)? listItem,
1874 : TResult Function(RichableOrderedListItem value)? orderedListItem,
1875 : TResult Function(RichableImage value)? image,
1876 : TResult Function(RichableEmbed value)? embed,
1877 : required TResult orElse(),
1878 : }) {
1879 : if (listItem != null) {
1880 0 : return listItem(this);
1881 : }
1882 0 : return orElse();
1883 : }
1884 :
1885 0 : @override
1886 : Map<String, dynamic> toJson() {
1887 0 : return _$_$RichableListItemToJson(this)..['type'] = 'list-item';
1888 : }
1889 : }
1890 :
1891 : abstract class RichableListItem implements Richable {
1892 : const factory RichableListItem(
1893 : {required List<Span> spans,
1894 : required String text,
1895 : required String type}) = _$RichableListItem;
1896 :
1897 : factory RichableListItem.fromJson(Map<String, dynamic> json) =
1898 : _$RichableListItem.fromJson;
1899 :
1900 0 : List<Span> get spans => throw _privateConstructorUsedError;
1901 0 : String get text => throw _privateConstructorUsedError;
1902 0 : String get type => throw _privateConstructorUsedError;
1903 0 : @JsonKey(ignore: true)
1904 : $RichableListItemCopyWith<RichableListItem> get copyWith =>
1905 0 : throw _privateConstructorUsedError;
1906 : }
1907 :
1908 : /// @nodoc
1909 : abstract class $RichableOrderedListItemCopyWith<$Res> {
1910 : factory $RichableOrderedListItemCopyWith(RichableOrderedListItem value,
1911 : $Res Function(RichableOrderedListItem) then) =
1912 : _$RichableOrderedListItemCopyWithImpl<$Res>;
1913 : $Res call({List<Span> spans, String text, String type});
1914 : }
1915 :
1916 : /// @nodoc
1917 : class _$RichableOrderedListItemCopyWithImpl<$Res>
1918 : extends _$RichableCopyWithImpl<$Res>
1919 : implements $RichableOrderedListItemCopyWith<$Res> {
1920 0 : _$RichableOrderedListItemCopyWithImpl(RichableOrderedListItem _value,
1921 : $Res Function(RichableOrderedListItem) _then)
1922 0 : : super(_value, (v) => _then(v as RichableOrderedListItem));
1923 :
1924 0 : @override
1925 0 : RichableOrderedListItem get _value => super._value as RichableOrderedListItem;
1926 :
1927 0 : @override
1928 : $Res call({
1929 : Object? spans = freezed,
1930 : Object? text = freezed,
1931 : Object? type = freezed,
1932 : }) {
1933 0 : return _then(RichableOrderedListItem(
1934 0 : spans: spans == freezed
1935 0 : ? _value.spans
1936 : : spans // ignore: cast_nullable_to_non_nullable
1937 : as List<Span>,
1938 0 : text: text == freezed
1939 0 : ? _value.text
1940 : : text // ignore: cast_nullable_to_non_nullable
1941 : as String,
1942 0 : type: type == freezed
1943 0 : ? _value.type
1944 : : type // ignore: cast_nullable_to_non_nullable
1945 : as String,
1946 : ));
1947 : }
1948 : }
1949 :
1950 : /// @nodoc
1951 : @JsonSerializable()
1952 : @FreezedUnionValue('o-list-item')
1953 : class _$RichableOrderedListItem implements RichableOrderedListItem {
1954 1 : const _$RichableOrderedListItem(
1955 : {required this.spans, required this.text, required this.type});
1956 :
1957 1 : factory _$RichableOrderedListItem.fromJson(Map<String, dynamic> json) =>
1958 1 : _$_$RichableOrderedListItemFromJson(json);
1959 :
1960 : @override
1961 : final List<Span> spans;
1962 : @override
1963 : final String text;
1964 : @override
1965 : final String type;
1966 :
1967 0 : @override
1968 : String toString() {
1969 0 : return 'Richable.orderedListItem(spans: $spans, text: $text, type: $type)';
1970 : }
1971 :
1972 0 : @override
1973 : bool operator ==(dynamic other) {
1974 : return identical(this, other) ||
1975 0 : (other is RichableOrderedListItem &&
1976 0 : (identical(other.spans, spans) ||
1977 0 : const DeepCollectionEquality().equals(other.spans, spans)) &&
1978 0 : (identical(other.text, text) ||
1979 0 : const DeepCollectionEquality().equals(other.text, text)) &&
1980 0 : (identical(other.type, type) ||
1981 0 : const DeepCollectionEquality().equals(other.type, type)));
1982 : }
1983 :
1984 0 : @override
1985 : int get hashCode =>
1986 0 : runtimeType.hashCode ^
1987 0 : const DeepCollectionEquality().hash(spans) ^
1988 0 : const DeepCollectionEquality().hash(text) ^
1989 0 : const DeepCollectionEquality().hash(type);
1990 :
1991 0 : @JsonKey(ignore: true)
1992 : @override
1993 : $RichableOrderedListItemCopyWith<RichableOrderedListItem> get copyWith =>
1994 0 : _$RichableOrderedListItemCopyWithImpl<RichableOrderedListItem>(
1995 : this, _$identity);
1996 :
1997 0 : @override
1998 : @optionalTypeArgs
1999 : TResult when<TResult extends Object?>({
2000 : required TResult Function(List<Span> spans, String text, String type)
2001 : heading1,
2002 : required TResult Function(List<Span> spans, String text, String type)
2003 : heading2,
2004 : required TResult Function(List<Span> spans, String text, String type)
2005 : heading3,
2006 : required TResult Function(List<Span> spans, String text, String type)
2007 : heading4,
2008 : required TResult Function(List<Span> spans, String text, String type)
2009 : heading5,
2010 : required TResult Function(List<Span> spans, String text, String type)
2011 : heading6,
2012 : required TResult Function(List<Span> spans, String text, String type)
2013 : paragraph,
2014 : required TResult Function(List<Span> spans, String text, String type)
2015 : listItem,
2016 : required TResult Function(List<Span> spans, String text, String type)
2017 : orderedListItem,
2018 : required TResult Function(
2019 : String? alt, String? copyright, Dimension dimensions, String url)
2020 : image,
2021 : required TResult Function(
2022 : @JsonKey(name: 'oembed') EmbedData info, String type)
2023 : embed,
2024 : }) {
2025 0 : return orderedListItem(spans, text, type);
2026 : }
2027 :
2028 0 : @override
2029 : @optionalTypeArgs
2030 : TResult maybeWhen<TResult extends Object?>({
2031 : TResult Function(List<Span> spans, String text, String type)? heading1,
2032 : TResult Function(List<Span> spans, String text, String type)? heading2,
2033 : TResult Function(List<Span> spans, String text, String type)? heading3,
2034 : TResult Function(List<Span> spans, String text, String type)? heading4,
2035 : TResult Function(List<Span> spans, String text, String type)? heading5,
2036 : TResult Function(List<Span> spans, String text, String type)? heading6,
2037 : TResult Function(List<Span> spans, String text, String type)? paragraph,
2038 : TResult Function(List<Span> spans, String text, String type)? listItem,
2039 : TResult Function(List<Span> spans, String text, String type)?
2040 : orderedListItem,
2041 : TResult Function(
2042 : String? alt, String? copyright, Dimension dimensions, String url)?
2043 : image,
2044 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
2045 : embed,
2046 : required TResult orElse(),
2047 : }) {
2048 : if (orderedListItem != null) {
2049 0 : return orderedListItem(spans, text, type);
2050 : }
2051 0 : return orElse();
2052 : }
2053 :
2054 0 : @override
2055 : @optionalTypeArgs
2056 : TResult map<TResult extends Object?>({
2057 : required TResult Function(RichableHeading1 value) heading1,
2058 : required TResult Function(RichableHeading2 value) heading2,
2059 : required TResult Function(RichableHeading3 value) heading3,
2060 : required TResult Function(RichableHeading4 value) heading4,
2061 : required TResult Function(RichableHeading5 value) heading5,
2062 : required TResult Function(RichableHeading6 value) heading6,
2063 : required TResult Function(RichableParagraph value) paragraph,
2064 : required TResult Function(RichableListItem value) listItem,
2065 : required TResult Function(RichableOrderedListItem value) orderedListItem,
2066 : required TResult Function(RichableImage value) image,
2067 : required TResult Function(RichableEmbed value) embed,
2068 : }) {
2069 0 : return orderedListItem(this);
2070 : }
2071 :
2072 0 : @override
2073 : @optionalTypeArgs
2074 : TResult maybeMap<TResult extends Object?>({
2075 : TResult Function(RichableHeading1 value)? heading1,
2076 : TResult Function(RichableHeading2 value)? heading2,
2077 : TResult Function(RichableHeading3 value)? heading3,
2078 : TResult Function(RichableHeading4 value)? heading4,
2079 : TResult Function(RichableHeading5 value)? heading5,
2080 : TResult Function(RichableHeading6 value)? heading6,
2081 : TResult Function(RichableParagraph value)? paragraph,
2082 : TResult Function(RichableListItem value)? listItem,
2083 : TResult Function(RichableOrderedListItem value)? orderedListItem,
2084 : TResult Function(RichableImage value)? image,
2085 : TResult Function(RichableEmbed value)? embed,
2086 : required TResult orElse(),
2087 : }) {
2088 : if (orderedListItem != null) {
2089 0 : return orderedListItem(this);
2090 : }
2091 0 : return orElse();
2092 : }
2093 :
2094 0 : @override
2095 : Map<String, dynamic> toJson() {
2096 0 : return _$_$RichableOrderedListItemToJson(this)..['type'] = 'o-list-item';
2097 : }
2098 : }
2099 :
2100 : abstract class RichableOrderedListItem implements Richable {
2101 : const factory RichableOrderedListItem(
2102 : {required List<Span> spans,
2103 : required String text,
2104 : required String type}) = _$RichableOrderedListItem;
2105 :
2106 : factory RichableOrderedListItem.fromJson(Map<String, dynamic> json) =
2107 : _$RichableOrderedListItem.fromJson;
2108 :
2109 0 : List<Span> get spans => throw _privateConstructorUsedError;
2110 0 : String get text => throw _privateConstructorUsedError;
2111 0 : String get type => throw _privateConstructorUsedError;
2112 0 : @JsonKey(ignore: true)
2113 : $RichableOrderedListItemCopyWith<RichableOrderedListItem> get copyWith =>
2114 0 : throw _privateConstructorUsedError;
2115 : }
2116 :
2117 : /// @nodoc
2118 : abstract class $RichableImageCopyWith<$Res> {
2119 : factory $RichableImageCopyWith(
2120 : RichableImage value, $Res Function(RichableImage) then) =
2121 : _$RichableImageCopyWithImpl<$Res>;
2122 : $Res call({String? alt, String? copyright, Dimension dimensions, String url});
2123 :
2124 : $DimensionCopyWith<$Res> get dimensions;
2125 : }
2126 :
2127 : /// @nodoc
2128 : class _$RichableImageCopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
2129 : implements $RichableImageCopyWith<$Res> {
2130 0 : _$RichableImageCopyWithImpl(
2131 : RichableImage _value, $Res Function(RichableImage) _then)
2132 0 : : super(_value, (v) => _then(v as RichableImage));
2133 :
2134 0 : @override
2135 0 : RichableImage get _value => super._value as RichableImage;
2136 :
2137 0 : @override
2138 : $Res call({
2139 : Object? alt = freezed,
2140 : Object? copyright = freezed,
2141 : Object? dimensions = freezed,
2142 : Object? url = freezed,
2143 : }) {
2144 0 : return _then(RichableImage(
2145 0 : alt: alt == freezed
2146 0 : ? _value.alt
2147 : : alt // ignore: cast_nullable_to_non_nullable
2148 : as String?,
2149 0 : copyright: copyright == freezed
2150 0 : ? _value.copyright
2151 : : copyright // ignore: cast_nullable_to_non_nullable
2152 : as String?,
2153 0 : dimensions: dimensions == freezed
2154 0 : ? _value.dimensions
2155 : : dimensions // ignore: cast_nullable_to_non_nullable
2156 : as Dimension,
2157 0 : url: url == freezed
2158 0 : ? _value.url
2159 : : url // ignore: cast_nullable_to_non_nullable
2160 : as String,
2161 : ));
2162 : }
2163 :
2164 0 : @override
2165 : $DimensionCopyWith<$Res> get dimensions {
2166 0 : return $DimensionCopyWith<$Res>(_value.dimensions, (value) {
2167 0 : return _then(_value.copyWith(dimensions: value));
2168 : });
2169 : }
2170 : }
2171 :
2172 : /// @nodoc
2173 : @JsonSerializable()
2174 : class _$RichableImage implements RichableImage {
2175 1 : const _$RichableImage(
2176 : {this.alt, this.copyright, required this.dimensions, required this.url});
2177 :
2178 1 : factory _$RichableImage.fromJson(Map<String, dynamic> json) =>
2179 1 : _$_$RichableImageFromJson(json);
2180 :
2181 : @override
2182 : final String? alt;
2183 : @override
2184 : final String? copyright;
2185 : @override
2186 : final Dimension dimensions;
2187 : @override
2188 : final String url;
2189 :
2190 0 : @override
2191 : String toString() {
2192 0 : return 'Richable.image(alt: $alt, copyright: $copyright, dimensions: $dimensions, url: $url)';
2193 : }
2194 :
2195 0 : @override
2196 : bool operator ==(dynamic other) {
2197 : return identical(this, other) ||
2198 0 : (other is RichableImage &&
2199 0 : (identical(other.alt, alt) ||
2200 0 : const DeepCollectionEquality().equals(other.alt, alt)) &&
2201 0 : (identical(other.copyright, copyright) ||
2202 : const DeepCollectionEquality()
2203 0 : .equals(other.copyright, copyright)) &&
2204 0 : (identical(other.dimensions, dimensions) ||
2205 : const DeepCollectionEquality()
2206 0 : .equals(other.dimensions, dimensions)) &&
2207 0 : (identical(other.url, url) ||
2208 0 : const DeepCollectionEquality().equals(other.url, url)));
2209 : }
2210 :
2211 0 : @override
2212 : int get hashCode =>
2213 0 : runtimeType.hashCode ^
2214 0 : const DeepCollectionEquality().hash(alt) ^
2215 0 : const DeepCollectionEquality().hash(copyright) ^
2216 0 : const DeepCollectionEquality().hash(dimensions) ^
2217 0 : const DeepCollectionEquality().hash(url);
2218 :
2219 0 : @JsonKey(ignore: true)
2220 : @override
2221 : $RichableImageCopyWith<RichableImage> get copyWith =>
2222 0 : _$RichableImageCopyWithImpl<RichableImage>(this, _$identity);
2223 :
2224 0 : @override
2225 : @optionalTypeArgs
2226 : TResult when<TResult extends Object?>({
2227 : required TResult Function(List<Span> spans, String text, String type)
2228 : heading1,
2229 : required TResult Function(List<Span> spans, String text, String type)
2230 : heading2,
2231 : required TResult Function(List<Span> spans, String text, String type)
2232 : heading3,
2233 : required TResult Function(List<Span> spans, String text, String type)
2234 : heading4,
2235 : required TResult Function(List<Span> spans, String text, String type)
2236 : heading5,
2237 : required TResult Function(List<Span> spans, String text, String type)
2238 : heading6,
2239 : required TResult Function(List<Span> spans, String text, String type)
2240 : paragraph,
2241 : required TResult Function(List<Span> spans, String text, String type)
2242 : listItem,
2243 : required TResult Function(List<Span> spans, String text, String type)
2244 : orderedListItem,
2245 : required TResult Function(
2246 : String? alt, String? copyright, Dimension dimensions, String url)
2247 : image,
2248 : required TResult Function(
2249 : @JsonKey(name: 'oembed') EmbedData info, String type)
2250 : embed,
2251 : }) {
2252 0 : return image(alt, copyright, dimensions, url);
2253 : }
2254 :
2255 0 : @override
2256 : @optionalTypeArgs
2257 : TResult maybeWhen<TResult extends Object?>({
2258 : TResult Function(List<Span> spans, String text, String type)? heading1,
2259 : TResult Function(List<Span> spans, String text, String type)? heading2,
2260 : TResult Function(List<Span> spans, String text, String type)? heading3,
2261 : TResult Function(List<Span> spans, String text, String type)? heading4,
2262 : TResult Function(List<Span> spans, String text, String type)? heading5,
2263 : TResult Function(List<Span> spans, String text, String type)? heading6,
2264 : TResult Function(List<Span> spans, String text, String type)? paragraph,
2265 : TResult Function(List<Span> spans, String text, String type)? listItem,
2266 : TResult Function(List<Span> spans, String text, String type)?
2267 : orderedListItem,
2268 : TResult Function(
2269 : String? alt, String? copyright, Dimension dimensions, String url)?
2270 : image,
2271 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
2272 : embed,
2273 : required TResult orElse(),
2274 : }) {
2275 : if (image != null) {
2276 0 : return image(alt, copyright, dimensions, url);
2277 : }
2278 0 : return orElse();
2279 : }
2280 :
2281 0 : @override
2282 : @optionalTypeArgs
2283 : TResult map<TResult extends Object?>({
2284 : required TResult Function(RichableHeading1 value) heading1,
2285 : required TResult Function(RichableHeading2 value) heading2,
2286 : required TResult Function(RichableHeading3 value) heading3,
2287 : required TResult Function(RichableHeading4 value) heading4,
2288 : required TResult Function(RichableHeading5 value) heading5,
2289 : required TResult Function(RichableHeading6 value) heading6,
2290 : required TResult Function(RichableParagraph value) paragraph,
2291 : required TResult Function(RichableListItem value) listItem,
2292 : required TResult Function(RichableOrderedListItem value) orderedListItem,
2293 : required TResult Function(RichableImage value) image,
2294 : required TResult Function(RichableEmbed value) embed,
2295 : }) {
2296 0 : return image(this);
2297 : }
2298 :
2299 0 : @override
2300 : @optionalTypeArgs
2301 : TResult maybeMap<TResult extends Object?>({
2302 : TResult Function(RichableHeading1 value)? heading1,
2303 : TResult Function(RichableHeading2 value)? heading2,
2304 : TResult Function(RichableHeading3 value)? heading3,
2305 : TResult Function(RichableHeading4 value)? heading4,
2306 : TResult Function(RichableHeading5 value)? heading5,
2307 : TResult Function(RichableHeading6 value)? heading6,
2308 : TResult Function(RichableParagraph value)? paragraph,
2309 : TResult Function(RichableListItem value)? listItem,
2310 : TResult Function(RichableOrderedListItem value)? orderedListItem,
2311 : TResult Function(RichableImage value)? image,
2312 : TResult Function(RichableEmbed value)? embed,
2313 : required TResult orElse(),
2314 : }) {
2315 : if (image != null) {
2316 0 : return image(this);
2317 : }
2318 0 : return orElse();
2319 : }
2320 :
2321 0 : @override
2322 : Map<String, dynamic> toJson() {
2323 0 : return _$_$RichableImageToJson(this)..['type'] = 'image';
2324 : }
2325 : }
2326 :
2327 : abstract class RichableImage implements Richable {
2328 : const factory RichableImage(
2329 : {String? alt,
2330 : String? copyright,
2331 : required Dimension dimensions,
2332 : required String url}) = _$RichableImage;
2333 :
2334 : factory RichableImage.fromJson(Map<String, dynamic> json) =
2335 : _$RichableImage.fromJson;
2336 :
2337 0 : String? get alt => throw _privateConstructorUsedError;
2338 0 : String? get copyright => throw _privateConstructorUsedError;
2339 0 : Dimension get dimensions => throw _privateConstructorUsedError;
2340 0 : String get url => throw _privateConstructorUsedError;
2341 0 : @JsonKey(ignore: true)
2342 : $RichableImageCopyWith<RichableImage> get copyWith =>
2343 0 : throw _privateConstructorUsedError;
2344 : }
2345 :
2346 : /// @nodoc
2347 : abstract class $RichableEmbedCopyWith<$Res> {
2348 : factory $RichableEmbedCopyWith(
2349 : RichableEmbed value, $Res Function(RichableEmbed) then) =
2350 : _$RichableEmbedCopyWithImpl<$Res>;
2351 : $Res call({@JsonKey(name: 'oembed') EmbedData info, String type});
2352 :
2353 : $EmbedDataCopyWith<$Res> get info;
2354 : }
2355 :
2356 : /// @nodoc
2357 : class _$RichableEmbedCopyWithImpl<$Res> extends _$RichableCopyWithImpl<$Res>
2358 : implements $RichableEmbedCopyWith<$Res> {
2359 0 : _$RichableEmbedCopyWithImpl(
2360 : RichableEmbed _value, $Res Function(RichableEmbed) _then)
2361 0 : : super(_value, (v) => _then(v as RichableEmbed));
2362 :
2363 0 : @override
2364 0 : RichableEmbed get _value => super._value as RichableEmbed;
2365 :
2366 0 : @override
2367 : $Res call({
2368 : Object? info = freezed,
2369 : Object? type = freezed,
2370 : }) {
2371 0 : return _then(RichableEmbed(
2372 0 : info: info == freezed
2373 0 : ? _value.info
2374 : : info // ignore: cast_nullable_to_non_nullable
2375 : as EmbedData,
2376 0 : type: type == freezed
2377 0 : ? _value.type
2378 : : type // ignore: cast_nullable_to_non_nullable
2379 : as String,
2380 : ));
2381 : }
2382 :
2383 0 : @override
2384 : $EmbedDataCopyWith<$Res> get info {
2385 0 : return $EmbedDataCopyWith<$Res>(_value.info, (value) {
2386 0 : return _then(_value.copyWith(info: value));
2387 : });
2388 : }
2389 : }
2390 :
2391 : /// @nodoc
2392 : @JsonSerializable()
2393 : class _$RichableEmbed implements RichableEmbed {
2394 1 : const _$RichableEmbed(
2395 : {@JsonKey(name: 'oembed') required this.info, required this.type});
2396 :
2397 1 : factory _$RichableEmbed.fromJson(Map<String, dynamic> json) =>
2398 1 : _$_$RichableEmbedFromJson(json);
2399 :
2400 : @override
2401 : @JsonKey(name: 'oembed')
2402 : final EmbedData info;
2403 : @override
2404 : final String type;
2405 :
2406 0 : @override
2407 : String toString() {
2408 0 : return 'Richable.embed(info: $info, type: $type)';
2409 : }
2410 :
2411 0 : @override
2412 : bool operator ==(dynamic other) {
2413 : return identical(this, other) ||
2414 0 : (other is RichableEmbed &&
2415 0 : (identical(other.info, info) ||
2416 0 : const DeepCollectionEquality().equals(other.info, info)) &&
2417 0 : (identical(other.type, type) ||
2418 0 : const DeepCollectionEquality().equals(other.type, type)));
2419 : }
2420 :
2421 0 : @override
2422 : int get hashCode =>
2423 0 : runtimeType.hashCode ^
2424 0 : const DeepCollectionEquality().hash(info) ^
2425 0 : const DeepCollectionEquality().hash(type);
2426 :
2427 0 : @JsonKey(ignore: true)
2428 : @override
2429 : $RichableEmbedCopyWith<RichableEmbed> get copyWith =>
2430 0 : _$RichableEmbedCopyWithImpl<RichableEmbed>(this, _$identity);
2431 :
2432 0 : @override
2433 : @optionalTypeArgs
2434 : TResult when<TResult extends Object?>({
2435 : required TResult Function(List<Span> spans, String text, String type)
2436 : heading1,
2437 : required TResult Function(List<Span> spans, String text, String type)
2438 : heading2,
2439 : required TResult Function(List<Span> spans, String text, String type)
2440 : heading3,
2441 : required TResult Function(List<Span> spans, String text, String type)
2442 : heading4,
2443 : required TResult Function(List<Span> spans, String text, String type)
2444 : heading5,
2445 : required TResult Function(List<Span> spans, String text, String type)
2446 : heading6,
2447 : required TResult Function(List<Span> spans, String text, String type)
2448 : paragraph,
2449 : required TResult Function(List<Span> spans, String text, String type)
2450 : listItem,
2451 : required TResult Function(List<Span> spans, String text, String type)
2452 : orderedListItem,
2453 : required TResult Function(
2454 : String? alt, String? copyright, Dimension dimensions, String url)
2455 : image,
2456 : required TResult Function(
2457 : @JsonKey(name: 'oembed') EmbedData info, String type)
2458 : embed,
2459 : }) {
2460 0 : return embed(info, type);
2461 : }
2462 :
2463 0 : @override
2464 : @optionalTypeArgs
2465 : TResult maybeWhen<TResult extends Object?>({
2466 : TResult Function(List<Span> spans, String text, String type)? heading1,
2467 : TResult Function(List<Span> spans, String text, String type)? heading2,
2468 : TResult Function(List<Span> spans, String text, String type)? heading3,
2469 : TResult Function(List<Span> spans, String text, String type)? heading4,
2470 : TResult Function(List<Span> spans, String text, String type)? heading5,
2471 : TResult Function(List<Span> spans, String text, String type)? heading6,
2472 : TResult Function(List<Span> spans, String text, String type)? paragraph,
2473 : TResult Function(List<Span> spans, String text, String type)? listItem,
2474 : TResult Function(List<Span> spans, String text, String type)?
2475 : orderedListItem,
2476 : TResult Function(
2477 : String? alt, String? copyright, Dimension dimensions, String url)?
2478 : image,
2479 : TResult Function(@JsonKey(name: 'oembed') EmbedData info, String type)?
2480 : embed,
2481 : required TResult orElse(),
2482 : }) {
2483 : if (embed != null) {
2484 0 : return embed(info, type);
2485 : }
2486 0 : return orElse();
2487 : }
2488 :
2489 0 : @override
2490 : @optionalTypeArgs
2491 : TResult map<TResult extends Object?>({
2492 : required TResult Function(RichableHeading1 value) heading1,
2493 : required TResult Function(RichableHeading2 value) heading2,
2494 : required TResult Function(RichableHeading3 value) heading3,
2495 : required TResult Function(RichableHeading4 value) heading4,
2496 : required TResult Function(RichableHeading5 value) heading5,
2497 : required TResult Function(RichableHeading6 value) heading6,
2498 : required TResult Function(RichableParagraph value) paragraph,
2499 : required TResult Function(RichableListItem value) listItem,
2500 : required TResult Function(RichableOrderedListItem value) orderedListItem,
2501 : required TResult Function(RichableImage value) image,
2502 : required TResult Function(RichableEmbed value) embed,
2503 : }) {
2504 0 : return embed(this);
2505 : }
2506 :
2507 0 : @override
2508 : @optionalTypeArgs
2509 : TResult maybeMap<TResult extends Object?>({
2510 : TResult Function(RichableHeading1 value)? heading1,
2511 : TResult Function(RichableHeading2 value)? heading2,
2512 : TResult Function(RichableHeading3 value)? heading3,
2513 : TResult Function(RichableHeading4 value)? heading4,
2514 : TResult Function(RichableHeading5 value)? heading5,
2515 : TResult Function(RichableHeading6 value)? heading6,
2516 : TResult Function(RichableParagraph value)? paragraph,
2517 : TResult Function(RichableListItem value)? listItem,
2518 : TResult Function(RichableOrderedListItem value)? orderedListItem,
2519 : TResult Function(RichableImage value)? image,
2520 : TResult Function(RichableEmbed value)? embed,
2521 : required TResult orElse(),
2522 : }) {
2523 : if (embed != null) {
2524 0 : return embed(this);
2525 : }
2526 0 : return orElse();
2527 : }
2528 :
2529 0 : @override
2530 : Map<String, dynamic> toJson() {
2531 0 : return _$_$RichableEmbedToJson(this)..['type'] = 'embed';
2532 : }
2533 : }
2534 :
2535 : abstract class RichableEmbed implements Richable {
2536 : const factory RichableEmbed(
2537 : {@JsonKey(name: 'oembed') required EmbedData info,
2538 : required String type}) = _$RichableEmbed;
2539 :
2540 : factory RichableEmbed.fromJson(Map<String, dynamic> json) =
2541 : _$RichableEmbed.fromJson;
2542 :
2543 0 : @JsonKey(name: 'oembed')
2544 0 : EmbedData get info => throw _privateConstructorUsedError;
2545 0 : String get type => throw _privateConstructorUsedError;
2546 0 : @JsonKey(ignore: true)
2547 : $RichableEmbedCopyWith<RichableEmbed> get copyWith =>
2548 0 : throw _privateConstructorUsedError;
2549 : }
|