convertNull method

T? convertNull(
  1. dynamic value,
  2. TypeInfo type,
  3. JsonSerializerOptions options
)

Converts a null value of the provided type to type T.

Implementation

T? convertNull(dynamic value, TypeInfo type, JsonSerializerOptions options) {
  if (value == null) {
    return null;
  }

  return convert(value, type, options);
}