basicTypeCastType function

Object? basicTypeCastType(
  1. Type type,
  2. Object? value
)

Handle int, num, double, String, bool

bool non 0/null nom value are converted to true int, double num are rounder to int if needed

Implementation

Object? basicTypeCastType(Type type, Object? value) {
  if (value == null) {
    return null;
  } else {
    return _nonNullBasicTypeCastType(type, value);
  }
}