Closed yaprogramming closed 3 months ago
PlutoColumnType.select cannot select object value when item is object.
Example Setup PlutoColumn:
class DropdownType { String text; dynamic value; DropdownType({required this.text, required this.value}); }
final selectStatus = [ DropdownType(text: 'YES', value: true), DropdownType(text: 'NO', value: false), ];
PlutoColumn( title: 'Status', field: 'isActive', type: PlutoColumnType.select( selectStatus, defaultValue: true, ), renderer: (rendererContext) { Color textColor = Colors.black; if (rendererContext.cell.value) { textColor = Colors.green; } else { textColor = Colors.red; } return Text( selectStatus.where((element) => element.value == rendererContext.cell.value).first.text, style: TextStyle( color: textColor, ), ); }, ),
Show in row success.
But select dropdown can't show object.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
PlutoColumnType.select cannot select object value when item is object.
Example Setup PlutoColumn:
Show in row success.
But select dropdown can't show object.