findById method

Future<ProductData?> findById(
  1. int productId
)

Implementation

Future<ProductData?> findById(int productId) async {
  return await (db.select(
    db.product,
  )..where((e) => e.id.equals(productId))).getSingleOrNull();
}