wrapToSql<D, S> static method
- TypeConverter<
D, S> inner, - D? dartValue
Invokes a non-nullable inner
type converter for a single conversion from
Dart to SQL.
Returns null
if dartValue
is null
, TypeConverter.toSql otherwise.
This method is mostly intended to be used for code generated by drift-dev.
Implementation
static S? wrapToSql<D, S>(TypeConverter<D, S> inner, D? dartValue) {
return dartValue == null ? null : inner.toSql(dartValue);
}