image property

String get image

returns first image src or a placeholder image

It is useful to show the image of the product in the product list

Implementation

String get image => images.isEmpty
    ? 'https://trello-attachments.s3.amazonaws.com/5d64f19a7cd71013a9a418cf/640x480/1dfc14f78ab0dbb3de0e62ae7ebded0c/placeholder.jpg'
    : images.first.originalSrc;