picsumImage static method

String picsumImage([
  1. int width = 200,
  2. int height = 200
])

Get a random image from Picsum with the specified dimensions.

Returns a URL string pointing to a random image on Picsum with the given width and height.

Example:

// Get a random image URL with default dimensions (200x200).
String imageUrl = FlutterHelperUtils.picsumImage();

// Get a random image URL with custom dimensions (300x400).
String customImageUrl = FlutterHelperUtils.picsumImage(300, 400);

Implementation

static String picsumImage([int width = 200, int height = 200]) {
  return 'https://picsum.photos/$width/$height';
}