save method Null safety

void save(
  1. OwnershipModel ownership
)

Persists ownership in _db.

Implementation

void save(OwnershipModel ownership) {
  _db.execute('''
  INSERT INTO $table
  VALUES ( ?, ?, ?, ?, ?, ?);
  ''', [
    ownership.transactionId,
    ownership.source,
    ownership.type.val,
    ownership.origin,
    ownership.about,
    jsonEncode(ownership.contains)
  ]);
}