Open Bes79 opened 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
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
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, ),
Thank you @bw-flagship ! Works fine now!
i have the same issue