EmbedBuilder class Null safety
Builds up embed object.
Constructors
-
EmbedBuilder({EmbedAuthorBuilder? author, DiscordColor? color, String? description, List<
EmbedFieldBuilder> fields = const [], String? imageUrl, String? thumbnailUrl, DateTime? timestamp, String? title, String? type, String? url}) - Creates clean instance EmbedBuilder
Properties
-
Author of embed
read / write
- color ↔ DiscordColor?
-
Color code of the embed
read / write
- description ↔ String?
-
Embed description.
read / write
-
fields
↔ List<
EmbedFieldBuilder> -
Embed custom fields;
read / write
-
Embed Footer
read / write
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- imageUrl ↔ String?
-
Image Url
read / write
- length → int
-
Total length of all text fields of embed
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- thumbnailUrl ↔ String?
-
Thumbnail Url
read / write
- timestamp ↔ DateTime?
-
Timestamp of embed content
read / write
- title ↔ String?
-
Embed title
read / write
- type ↔ String?
-
Embed type
read / write
- url ↔ String?
-
Url of Embed
read / write
Methods
-
addAuthor(
void builder(EmbedAuthorBuilder author)) → void - Adds author to embed.
-
addField(
{dynamic name, dynamic content, bool inline = false, dynamic builder(EmbedFieldBuilder field)?, EmbedFieldBuilder? field}) → void -
Adds field to embed.
name
andcontent
fields are required. Inline is set to false by default. - Adds footer to embed
-
build(
) → RawApiMap -
Builds object to Map() instance;
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
replaceField(
{dynamic name, dynamic content, bool inline = false, dynamic builder(EmbedFieldBuilder field)?, EmbedFieldBuilder? field}) → void -
Replaces field where
name
witch provided new field. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited