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

ExpandChild suggestions #16

Closed Zazo032 closed 3 years ago

Zazo032 commented 4 years ago

Currently, if you set expandArrowStyle to ExpandArrowStyle.text, a Tootltip is still shown on long press (with the same text as the button). Also, tooltipMessage is forced to upper case on the button: https://github.com/jesusrp98/expand_widget/blob/master/lib/src/expand_arrow.dart#L109, so setting collapsedHint to Test will result in a button with TEST text and a Test Tooltip.

jesusrp98 commented 4 years ago

I was aware of this issue, and I think it's about time this is fixed (sorry for the delay).

The tooltip should not be visible when expandArrowStyle is set to ExpandArrowStyle.text. On the other hand, I think it's OK to force the text to be upper case inside the button.

What do you think?

Zazo032 commented 4 years ago

For better customization, I think it'd better be an option to not force button text to be upper case. In our case, we're using it as a label button (e.g. "See more"), that expands a list of services, so per design, we need it to be lowercase. The tooltip may be fixed by detecting if it's either a mouse or touch event,.

jesusrp98 commented 4 years ago

OK I see. I think adding a new option to make text capital would be great.

Planning to implement it over the next few days. Also, the tooltip showing with ExpandArrowStyle.text or ExpandArrowStyle.both should be fixed now.