lorem_picsum 0.0.1+1 lorem_picsum: ^0.0.1+1 copied to clipboard
Dart client for Lorem Picsum, the Lorem Ipsum for photos
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);
}
License #
MIT
Credits #
This package is based on Lorem Picsum created by David Marby and Nijiko Yonskai