addField method

EmbedBuilder addField({
  1. required String name,
  2. required String value,
  3. bool? inline,
})

Add an field into fields and return this

final embed = EmbedBuilder()
  .addField(name: 'My field', value: 'My custom value');

Implementation

EmbedBuilder addField ({ required String name, required String value, bool? inline }) {
  fields ??= [];

  fields?.add(EmbedField(name: name, value: value, inline: inline));
  return this;
}