Flutter Pravatar | Coderz Product

flutter_pravatar

Last updated:

0 purchases

flutter_pravatar Image
flutter_pravatar Images

Free

Languages

Categories

Add to Cart

Description:

flutter pravatar

flutter_pravatar #
Display placeholder profile pictures from pravatar.cc/ for mocked users.
Usage #
Random #
Display a a random placholder avatar, different each time it is loaded.
@override
Widget build(BuildContext context) {
return Pravatar.random(),
}
copied to clipboard
Unique identifier #
Display the placholder avatar associated to the given uniqueId.
The avatar is guaranteed to be always the same as soon as the provided uniqueId is the same.
@override
Widget build(BuildContext context) {
return Pravatar.uniqueId('user10@email.com'),
}
copied to clipboard
Image identifier #
Display the placholder avatar from its imageId.

All identifiers are available on the website.

@override
Widget build(BuildContext context) {
return Pravatar.imageId(27),
}
copied to clipboard
Image provider #
If you want to use the image provider manually, you can use [PravatarImage].
@override
Widget build(BuildContext context) {
final devicePixelRatio = MediaQuery.of(context).devicePixelRatio;
return Image(
image: PravatarImage(
size: devicePixelRatio * 100,
uniqueId: 'user10@email.com',
),
);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product: (if this is empty don't purchase this product)

Customer Reviews

There are no reviews.