getClassNameForObject method

String? getClassNameForObject(
  1. Object data
)

Get the className for the provided object.

Implementation

String? getClassNameForObject(Object data) {
  if (data is int) {
    return 'int';
  } else if (data is double) {
    return 'double';
  } else if (data is String) {
    return 'String';
  } else if (data is bool) {
    return 'bool';
  } else if (data is DateTime) {
    return 'DateTime';
  } else if (data is ByteData) {
    return 'ByteData';
  } else if (data is Duration) {
    return 'Duration';
  } else if (data is UuidValue) {
    return 'UuidValue';
  }
  return null;
}