checkIntType function

String checkIntType(
  1. String string
)

Implementation

String checkIntType(String string) {
  if (string.contains(',')) {
    final intTry = double.tryParse(string);
    if (intTry != null) {
      return string;
    }
  } else {
    final intTry = int.tryParse(string);
    if (intTry != null) {
      return string;
    }
  }
  return '"$string"';
}