buildImageUrl method
Generate a Mindfulness Mode image URL from the MindfulnessModeTransition.
The image will be cropped based on the width
and height
values.
These values must be greater than 1.
Default values are used by the InspiroBot Web app.
Implementation
Uri buildImageUrl({
int width = 1600,
int height = 900,
}) {
assert(width > 1 && height > 1, 'Image dimensions must be greater than 1!');
return Uri(
scheme: 'https',
host: 'source.unsplash.com',
pathSegments: [
imageCode,
'${width}x$height',
],
);
}