EmbedBuilder class

Embed builder component used into Message.

You can use this builder to extends extends your class like this.

class MyEmbed extends EmbedBuilder {
  MyEmbed(String title): super(
    title: title,
    color: Color.invisible
  );
}

Constructors

EmbedBuilder({String? title, String? description, String? url, DateTime? timestamp, EmbedFooter? footer, EmbedImage? image, EmbedThumbnail? thumbnail, EmbedAuthor? author, List<EmbedField>? fields, Color? color})
EmbedBuilder.from(dynamic payload)
factory
EmbedBuilder.fromGuildPreview(GuildPreview preview)
Create new instance of this to build an embed from a GuildPreview
factory

Properties

author EmbedAuthor?
Author of this.
getter/setter pair
color Color?
Color of this.
getter/setter pair
description String?
Description of this.
getter/setter pair
fields List<EmbedField>?
Fields of this.
getter/setter pair
Footer of this.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
image EmbedImage?
Image of this.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbnail EmbedThumbnail?
Thumbnail of this.
getter/setter pair
timestamp DateTime?
Timestamp of this.
getter/setter pair
title String?
Title of this.
getter/setter pair
url String?
Url of this.
getter/setter pair

Methods

addField({required String name, required String value, bool? inline}) EmbedBuilder
Add an field into fields and return this
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAuthor({required String name, String? url, String? iconUrl, String? proxyIconUrl}) EmbedBuilder
Set the author field and return this
setColor(Color color) EmbedBuilder
Set the color field and return this
setDescription(String value) EmbedBuilder
Set the description field and return this
setFooter({required String text, String? iconUrl, String? proxyIconUrl}) EmbedBuilder
Set the footer field and return this
setImage({required String url, String? proxyUrl, int? width, int? height}) EmbedBuilder
Set the image field and return this
setThumbnail({required String url, String? proxyUrl, int? width, int? height}) EmbedBuilder
Set the thumbnail field and return this
setTimestamp({DateTime? dateTime}) EmbedBuilder
Set the timestamp field and return this
setTitle(String value) EmbedBuilder
Set the title field and return this
setUrl(String url) EmbedBuilder
Set the url field and return this
toJson() Object
Converts the EmbedBuilder to a Map that can be serialized to JSON.
toString() String
A string representation of this object.
inherited

Operators

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