blacklist method
Blacklists all of the CSS classes represented by a space-delimited list of className
s
if shouldBlacklist
is true
.
Classes added to the blacklist will not appear in the result of toClassName.
Is a noop if shouldBlacklist
is false
, className
is null
or className
is an empty string.
Related: add
Implementation
void blacklist(String? className, [bool shouldBlacklist = true]) {
if (!shouldBlacklist || className == null || className == '') {
return;
}
if (_blacklistBuffer == null) {
_blacklistBuffer = StringBuffer();
} else {
if (_blacklistBuffer!.isNotEmpty) {
_blacklistBuffer!.write(' ');
}
}
_blacklistBuffer!.write(className);
}