V3 context.style.markerContent replacement
Opened this issue · 0 comments
vlowe85 commented
Hi,
In v2, i could use customRender on li
and get the marker like this Text((extensionContext.style.markerContent as Text).data!,
. what is the alternative in v3?
extensions: [
TagExtension(
tagsToExtend: {"li"},
builder: (extensionContext) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Container(
decoration: BoxDecoration(
color: context.col.oldColourIconChosenBackground,
borderRadius: const BorderRadius.all(Radius.circular(8))
),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Text((extensionContext.style.markerContent as Text).data!,
style: textStyleBodyLarge.copyWith(color: context.col.oldColourStandardSelectedAlternate),
),
),
Expanded(child: Text(extensionContext.element!.innerHtml,
style: textStyleBodyLarge.copyWith(color: context.col.oldColourTextInsightsMoodEmptyBody)
),
)],
),
)
),
);
},
),
],