contains method

bool contains(
  1. String? styleName
)

Method returns True if collection contains style with specified by user name.

Implementation

bool contains(String? styleName) {
  if (styleName == null) {
    throw Exception('name');
  }

  if (styleName.isEmpty) {
    throw Exception('name - string cannot be empty.');
  }

  return _dictStyles.containsKey(styleName);
}