mapToSqlVariable method Null safety

  1. @override
int? mapToSqlVariable(
  1. bool? content
)
override

Maps the content to a value that we can send together with a prepared statement to represent the given value.

Implementation

@override
int? mapToSqlVariable(bool? content) {
  if (content == null) {
    // ignore: avoid_returning_null
    return null;
  }
  return content ? 1 : 0;
}