withUnderlineStyle static method
Encodes style into mask, setting or clearing underline accordingly.
Implementation
static int withUnderlineStyle(int mask, UnderlineStyle style) {
if (style == UnderlineStyle.none) {
return mask & ~(underline | underlineStyleMask);
}
return (mask & ~underlineStyleMask) | underline | style.bitMask;
}