Linkeable class

Base class for items that reference by link

MediaLinkeable, DocumentLinkeable or WebLinkeable

Implementers
Annotations
  • @Freezed(unionKey: 'link_type', unionValueCase: FreezedUnionCase.snake)

Constructors

Linkeable.document({@JsonKey(name: 'type') required String documentType, required List<String> tags, required String id, required String lang, required String slug, required bool isBroken})
DocumentReference model
const
factory
Linkeable.fromJson(Map<String, dynamic> json)
Creates a Linkeable object from json
factory
Linkeable.media({String? height, String? width, String? kind, String? name, String? size, String? url})
Media model
const
factory
Linkeable.web({required String url})
Web model
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult document(DocumentLinkeable value), required TResult media(MediaLinkeable value), required TResult web(WebLinkeable value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? document(DocumentLinkeable value)?, TResult? media(MediaLinkeable value)?, TResult? web(WebLinkeable value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult document(DocumentLinkeable value)?, TResult media(MediaLinkeable value)?, TResult web(WebLinkeable value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult document(String documentType, List<String> tags, String id, String lang, String slug, bool isBroken)?, TResult media(String? height, String? width, String? kind, String? name, String? size, String? url)?, TResult web(String url)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult document(String documentType, List<String> tags, String id, String lang, String slug, bool isBroken), required TResult media(String? height, String? width, String? kind, String? name, String? size, String? url), required TResult web(String url)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? document(String documentType, List<String> tags, String id, String lang, String slug, bool isBroken)?, TResult? media(String? height, String? width, String? kind, String? name, String? size, String? url)?, TResult? web(String url)?}) → TResult?
inherited

Operators

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