vyuh-tech / vyuh

Build Modular, Scalable, CMS-driven Flutter Apps
https://vyuh.tech
Other
26 stars 10 forks source link

nice Package for flutter to render the UI from sanity, it would be better even if you manage the images and add an option to add custom widget for lineItem #5

Closed chenna8464 closed 2 months ago

chenna8464 commented 2 months ago

currently, we have these types
enum ListItemType { bullet, square, number } if someone wants to add their own widget here, they can't

pavanpodila commented 2 months ago

Good point. However these are dictated by the PortableText specification and there is no option to extend the list item type. One option is to expose custom renderer for the particular list item

pavanpodila commented 2 months ago

With this commit, we now have the ability to customize the bullet renderer by passing it as an option to PortableTextConfig. You can see it in this commit: https://github.com/vyuh-tech/vyuh/commit/9b2ea4c3ec8d71f103dcfecc881437832f0a48c5

A new version has been published as well that includes this capability: https://pub.dev/packages/flutter_sanity_portable_text/changelog