getAsNullableType<T> method

T? getAsNullableType<T>(
  1. TypeCode type,
  2. String key
)

Converts map element into a value defined by specied typecode. If conversion is not possible it returns null.

  • type the TypeCode that defined the type of the result
  • key a key of element to get. Returns element value defined by the typecode or null if conversion is not supported.

See TypeConverter.toNullableType

Implementation

T? getAsNullableType<T>(TypeCode type, String key) {
  var value = get(key);
  return TypeConverter.toNullableType<T>(type, value);
}