styleFor method
Returns effective style to use for inline code for the specified
lineStyle
.
Implementation
TextStyle styleFor(Style lineStyle) {
if (lineStyle.containsKey(Attribute.h1.key)) {
return header1 ?? style;
}
if (lineStyle.containsKey(Attribute.h2.key)) {
return header2 ?? style;
}
if (lineStyle.containsKey(Attribute.h3.key)) {
return header3 ?? style;
}
return style;
}