toString method

  1. @override
String toString()
override

Returns a string representation of the ProductModel instance.

Implementation

@override
String toString() {
  return 'Product(\n id: $id, \n name: $title, \n price: $price \n)';
}