Skip to content
pubscout

simple_gravatar

1.1.0, released 6 years ago by an unverified publisher

A library to generate Gravatar URLs in Dart based on gravatar specs.

WASM-ready
$ flutter pub add simple_gravatar
Source repository

What it does

Simple Gravatar provides a utility class to compute MD5 hashes for email addresses and generate corresponding Gravatar image, QR code, and JSON profile URLs according to official specifications.

AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display user avatars from Gravatar using email addresses.
  • You need to generate Gravatar QR code or JSON profile URLs.

Skip it when

  • You are not using Gravatar services for avatars.
  • You need a full-featured caching image widget rather than just URL generation.

Strengths

  • Supports null safety and Dart 2.
  • Simple and straightforward API for generating different types of Gravatar URLs.

Weaknesses

  • Limited functionality focused solely on URL generation.
  • Relies on external service availability for the actual images.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:simple_gravatar/simple_gravatar.dart';

void main() {
  var gravatar = Gravatar('hello@example.com');
  var url = gravatar.imageUrl(
    size: 100,
    defaultImage: GravatarImage.retro,
    rating: GravatarRating.pg,
    fileExtension: true,
  );

  print('Gravatar URL:      $url');
}

Alternatives

Packages that do the same job and could replace simple_gravatar.

Works with

Packages commonly used together with simple_gravatar: ones it builds on, ones built on it, and its own family.