addTitle method

void addTitle(
  1. String text, {
  2. String language = 'en',
  3. TextEncoding encoding = TextEncoding.UTF8,
})

Implementation

void addTitle(String text,
    {String language = 'en', TextEncoding encoding = TextEncoding.UTF8}) {
  _titleRecords
      .add(TextRecord(language: language, text: text, encoding: encoding));
  if (_titleLanguages.contains(language)) {
    throw ArgumentError(
        "Language of titles can not be repeated, got $language");
  }
  _titleLanguages.add(language);
}