getTextStyle function
Implementation
getTextStyle(Highlight highlight) {
switch (highlight.type) {
case highlight_type.underline:
return readerBaseTextStyle.copyWith(decoration: TextDecoration.underline);
case highlight_type.bold:
return readerBaseTextStyle.copyWith(fontWeight: FontWeight.w900);
case highlight_type.italic:
return readerBaseTextStyle.copyWith(fontStyle: FontStyle.italic);
default:
return readerBaseTextStyle.copyWith(
backgroundColor: Color(highlight.color));
}
}