crawlinknetworks / dropdown_plus

Simple and easy to use Dropdown in forms with search, keyboard navigation, offiline data source, remote data source and easy customization.
MIT License
12 stars 43 forks source link

Not working onTap in last flutter - 3.7.1 #29

Open Bes79 opened 1 year ago

sahand77 commented 1 year ago

i have the same issue

sharpsaravanan commented 1 year ago

After flutter update onTap of dropdownItemFn listtile not working. please rectify the problem.

Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.22000.1455], locale en-IN) • Flutter version 3.7.0 on channel stable at C:\Users\sharp\Documents\flutter_windows_2.5.3-stable\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b06b8b2710 (2 weeks ago), 2023-01-23 16:55:55 -0800 • Engine revision b24591ed32 • Dart version 2.19.0 • DevTools version 2.20.1

bw-flagship commented 1 year ago

I fixed it in a fork, you can use it if you want:

  dropdown_plus:
    git:
      url: https://github.com/FlagshipApps/dropdown_plus.git
      ref: fc20896d3bd7cee387bae6b3cb9fbdef9176a4b6
nilotpalkapri commented 1 year ago

You can use SelectableText in "dropdownItemFn" property,

dropdownItemFn: (dynamic item, position, focused, dynamic lastSelectedItem, onTap) => ListTile( minVerticalPadding: 5.0, dense: true, contentPadding: const EdgeInsets.symmetric(horizontal: 5.0), title: SelectableText("$item", style: TextStyle( fontSize: 16, color: ColorPicker.fillColor(context, listen: false), //fontWeight: FontWeight.bold, ), onTap: onTap, ), tileColor: Colors.transparent,//focused ? Colors.cyanAccent[400] : onTap: onTap, ),

deniscass commented 9 months ago

Thank you @bw-flagship ! Works fine now!