flutter_smart_select icon indicating copy to clipboard operation
flutter_smart_select copied to clipboard

Change the value of the selected option from String to Text Widget

Open maikksmt opened this issue 4 years ago • 1 comments

Hello,

I want to ask for a change in tile.dart for class S2Tile<T> from

    /// The value of the selected option.
    final String value; 

to

    final Widget value;

and further dependent adaptions to have the same customization options available as for

    /// The primary content of the list tile.
    final Widget title;
Bildschirmfoto 2021-08-09 um 21 19 56

for now I have to edit _valueWidge{} within tile.dart to handle long text to 2 lines when overflow or set font size to get every option into single line. So I would like to have an option to customize it inside my project. Bildschirmfoto 2021-08-09 um 21 25 39 Bildschirmfoto 2021-08-09 um 21 25 59

Widget get _valueWidget {
    return Text(
      isLoading ? loadingText : value,
      style: const TextStyle(color: Colors.grey, fontSize: 26.0),
      overflow: TextOverflow.fade,
      softWrap: true,
      maxLines: 2,
    );
  }

maikksmt avatar Aug 09 '21 19:08 maikksmt

I released https://pub.dev/packages/flutter_awesome_select with fixed null safety. Could you check that everything works for you?

vasilich6107 avatar Nov 12 '21 23:11 vasilich6107

Hi everyone,

I'm sorry to announce that I'm no longer maintaining the smart_select package. It's been a great project, but it's become too difficult to maintain.

In its place, I've released a new package called choice. The combination to smart_select and chips_choice with cleaner, more flexible, and composable API for creating inline or prompted choice widgets with single or multiple selection.

I hope you'll check out choice. I think you'll find it to be a great replacement for smart_select.

Thanks for your understanding.

davigmacode avatar Aug 26 '23 10:08 davigmacode