getById method Null safety

TransactionModel? getById(
  1. Uint8List id
)

Gets a TransactionModel by its id

Implementation

TransactionModel? getById(Uint8List id) {
  List<TransactionModel> txns = _select(
      whereStmt: "WHERE $table.$columnId = x'${Bytes.hexEncode(id)}'");
  return txns.isEmpty ? null : txns.first;
}