xBuilder_XCell method
Implementation
Widget? xBuilder_XCell(DataGridCell<dynamic> item, XDataGridRow xGridDataRow) {
print("xBuilder_XCell");
if (item.value == null) {
return Text("", style: XStyles.xStyTextForSubLabel(textColor: Colors.white));
} else {
if (item.value!.runtimeType == String) {
return Text(item.value, style: XStyles.xStyTextForSubLabel(textColor: Colors.white));
} else if (item.value!.runtimeType == bool && item.value == true) {
return Container(alignment: Alignment.center, child: Icon(Icons.medical_services_outlined));
} else if (item.value!.runtimeType == DateTime) {
return Text(XUtils.dateToString(item.value, format: "dd MMM yyyy ", noDateLabel: ""), style: XStyles.xStyTextForSubLabel(textColor: Colors.white));
} else {
return Text(item.value.toString(), style: XStyles.xStyTextForSubLabel(textColor: Colors.white));
}
}
}