getTXTString function

String getTXTString(
  1. dynamic data
)

Implementation

String getTXTString(dynamic data) {
  if (data is String) {
    return data;
  } else if (data is int) {
    return data.toString();
  } else if (data is double) {
    return data.toString();
  } else if (data is bool) {
    return data.toString();
  } else {
    return "";
  }
}