getBySource method Null safety
- String source,
- String origin
Gets the OwnershipModel for source
and origin
in database.
Implementation
OwnershipModel? getBySource(String source, String origin) {
List params = [source, origin];
String where = "WHERE $columnSource = ? AND $columnOrigin = ?";
List<OwnershipModel> ownerships = _select(whereStmt: where, params: params);
return ownerships.isNotEmpty ? ownerships.first : null;
}