Last updated:
0 purchases
lorem picsum
lorem_picsum #
Dart client for Lorem Picsum, the Lorem Ipsum for photos
Usage #
import 'package:lorem_picsum/lorem_picsum.dart';
main() async {
final loremPicsum = LoremPicsum();
// get random image url, provide the width and height
String image = loremPicsum.getImage(200, 300);
// get specific image, provide id, width, and height
String specificImage = loremPicsum.getSpecificImage(1, 200, 300);
// get the same random image every time, provide seed, width, and height
String staticImage = loremPicsum.getStaticImage('seed', 200, 300);
// get image list, default limit is 30
List<Photo> photoList = await loremPicsum.getImageList(limit: 30, page: 1);
// get image detail
Photo photo = await loremPicsum.getImageDetail(1);
}
copied to clipboard
License #
MIT
Credits #
This package is based on Lorem Picsum created by David Marby and Nijiko Yonskai
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.