getAsTypeWithDefault<T> method Null safety

T getAsTypeWithDefault<T>(
  1. TypeCode type,
  2. int index,
  3. T defaultValue
)

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

  • type the TypeCode that defined the type of the result
  • index an index of element to get.
  • defaultValue the default value Returns element value defined by the typecode or default value if conversion is not supported.

See TypeConverter.toTypeWithDefault