jesusrp98 / expand_widget

Ability to easily expand and retract a widget collection or text
https://pub.dev/packages/expand_widget
GNU General Public License v3.0
45 stars 22 forks source link

Minimum height for ExpandChild #30

Closed ChauCM closed 1 year ago

ChauCM commented 2 years ago

I want to wrap my ExpandChild to Html widget, Html is similar as Text but render html and look better.

   ExpandChild(
                        arrowColor: Colors.red,
                        arrowSize: 16,
                        expandArrowStyle: ExpandArrowStyle.icon,
                        child: Html(
                            htmlString,
                            onLinkTap: (
                              String? url,
                              RenderContext context,
                              Map<String, String> attributes,
                              element,
                            ) =>  launchUrl(url)),
                      ),

Right now it show no content until user tap expand arrow, then it will display full content. I would like to set it to a minimum height so user can preview the content. If possible, I hope it can also detect childs height so only show expand button if child.height > minimum height

SeriousMonk commented 2 years ago

This would be a very useful feature. I am trying to use https://pub.dev/packages/flutter_linkify inside of expand_child, but I would still be able to show some lines of the text even when the widget is collapsed.

jesusrp98 commented 1 year ago

This is a great idea, and it'll be implemented in the upcoming release :)