replaceTag method

BBStylesheet replaceTag(
  1. AbstractTag tag
)

Replace a tag from this style.

Ensures the tag is actually replaced.

Implementation

BBStylesheet replaceTag(AbstractTag tag) {
  if (!_tags.containsKey(tag.tag)) {
    throw StylesheetException(
        "Cannot replace a tag that wasn't added yet. Consider using 'addTag' instead.");
  }

  _tags[tag.tag] = tag;
  return this;
}