Richable class
Base class for items in RichText
RichableParagraph
, RichableImage
or a RichableEmbed
- Implementers
- Annotations
-
- @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.kebab)
Constructors
- Richable.embed({@JsonKey(name: 'oembed') required EmbedData info, required String type})
-
RichableEmbed model
constfactory
-
Richable.fromJson(Map<
String, dynamic> json) -
Creates a Richable object from json
factory
-
Richable.heading1({required List<
Span> spans, required String text, required String type}) -
RichableHeading1 model
constfactory
-
Richable.heading2({required List<
Span> spans, required String text, required String type}) -
RichableHeading2 model
constfactory
-
Richable.heading3({required List<
Span> spans, required String text, required String type}) -
RichableHeading3 model
constfactory
-
Richable.heading4({required List<
Span> spans, required String text, required String type}) -
RichableHeading4 model
constfactory
-
Richable.heading5({required List<
Span> spans, required String text, required String type}) -
RichableHeading5 model
constfactory
-
Richable.heading6({required List<
Span> spans, required String text, required String type}) -
RichableHeading6 model
constfactory
- Richable.image({String? alt, String? copyright, required Dimension dimensions, required String url})
-
RichableImage model
constfactory
-
Richable.listItem({required List<
Span> spans, required String text, required String type}) -
RichableListItem model
constfactory
-
Richable.orderedListItem({required List<
Span> spans, required String text, required String type}) -
RichableListItem model
constfactory
-
Richable.paragraph({required List<
Span> spans, required String text, required String type}) -
RichableParagraph model
constfactory
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 heading1(RichableHeading1 value), required TResult heading2(RichableHeading2 value), required TResult heading3(RichableHeading3 value), required TResult heading4(RichableHeading4 value), required TResult heading5(RichableHeading5 value), required TResult heading6(RichableHeading6 value), required TResult paragraph(RichableParagraph value), required TResult listItem(RichableListItem value), required TResult orderedListItem(RichableOrderedListItem value), required TResult image(RichableImage value), required TResult embed(RichableEmbed value)}) → TResult -
inherited
-
mapOrNull<
TResult extends Object?> ({TResult heading1(RichableHeading1 value)?, TResult heading2(RichableHeading2 value)?, TResult heading3(RichableHeading3 value)?, TResult heading4(RichableHeading4 value)?, TResult heading5(RichableHeading5 value)?, TResult heading6(RichableHeading6 value)?, TResult paragraph(RichableParagraph value)?, TResult listItem(RichableListItem value)?, TResult orderedListItem(RichableOrderedListItem value)?, TResult image(RichableImage value)?, TResult embed(RichableEmbed value)?}) → TResult? -
inherited
-
maybeMap<
TResult extends Object?> ({TResult heading1(RichableHeading1 value)?, TResult heading2(RichableHeading2 value)?, TResult heading3(RichableHeading3 value)?, TResult heading4(RichableHeading4 value)?, TResult heading5(RichableHeading5 value)?, TResult heading6(RichableHeading6 value)?, TResult paragraph(RichableParagraph value)?, TResult listItem(RichableListItem value)?, TResult orderedListItem(RichableOrderedListItem value)?, TResult image(RichableImage value)?, TResult embed(RichableEmbed value)?, required TResult orElse()}) → TResult -
inherited
-
maybeWhen<
TResult extends Object?> ({TResult heading1(List< Span> spans, String text, String type)?, TResult heading2(List<Span> spans, String text, String type)?, TResult heading3(List<Span> spans, String text, String type)?, TResult heading4(List<Span> spans, String text, String type)?, TResult heading5(List<Span> spans, String text, String type)?, TResult heading6(List<Span> spans, String text, String type)?, TResult paragraph(List<Span> spans, String text, String type)?, TResult listItem(List<Span> spans, String text, String type)?, TResult orderedListItem(List<Span> spans, String text, String type)?, TResult image(String? alt, String? copyright, Dimension dimensions, String url)?, TResult embed(EmbedData info, String type)?, 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 heading1(List< Span> spans, String text, String type), required TResult heading2(List<Span> spans, String text, String type), required TResult heading3(List<Span> spans, String text, String type), required TResult heading4(List<Span> spans, String text, String type), required TResult heading5(List<Span> spans, String text, String type), required TResult heading6(List<Span> spans, String text, String type), required TResult paragraph(List<Span> spans, String text, String type), required TResult listItem(List<Span> spans, String text, String type), required TResult orderedListItem(List<Span> spans, String text, String type), required TResult image(String? alt, String? copyright, Dimension dimensions, String url), required TResult embed(EmbedData info, String type)}) → TResult -
inherited
-
whenOrNull<
TResult extends Object?> ({TResult heading1(List< Span> spans, String text, String type)?, TResult heading2(List<Span> spans, String text, String type)?, TResult heading3(List<Span> spans, String text, String type)?, TResult heading4(List<Span> spans, String text, String type)?, TResult heading5(List<Span> spans, String text, String type)?, TResult heading6(List<Span> spans, String text, String type)?, TResult paragraph(List<Span> spans, String text, String type)?, TResult listItem(List<Span> spans, String text, String type)?, TResult orderedListItem(List<Span> spans, String text, String type)?, TResult image(String? alt, String? copyright, Dimension dimensions, String url)?, TResult embed(EmbedData info, String type)?}) → TResult? -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited