buildListMarker method
Builds marker widget for a list item.
Implementation
Widget? buildListMarker(
BuildMetadata meta,
TextStyleHtml tsh,
String listStyleType,
int index,
) {
final text = getListMarkerText(listStyleType, index);
final style = tsh.style;
if (text.isNotEmpty) {
return RichText(
maxLines: 1,
softWrap: false,
text: TextSpan(style: style, text: text),
textDirection: tsh.textDirection,
);
}
switch (listStyleType) {
case kCssListStyleTypeCircle:
return HtmlListMarker.circle(style);
case kCssListStyleTypeNone:
return null;
case kCssListStyleTypeSquare:
return HtmlListMarker.square(style);
case kCssListStyleTypeDisc:
default:
return HtmlListMarker.disc(style);
}
}