Skip to content

PeterTheSalmon/tiny_avatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A simple way to generate and display pseudo-random avatars for your users. Inspired by tinygraphs.com

Getting started

Install the package:

flutter pub add tiny_avatar

Import it into your project:

import 'package:tiny_avatar/tiny_avatar.dart';

Features

  • Generate unique avatars from a single string
  • Customize colour, shape, and size with ease
  • Avatars are consistent - the same string always leads to the same result
  • Complete documentation

Usage

TinyAvatar(
    baseString: 'John',
    dimension: 150,
);

image


Customization

// Change colour scheme
TinyAvatar(
    baseString: 'c418',
    dimension: 150,
    colourScheme: TinyAvatarColourScheme.heated,
),

// Circular option
TinyAvatar(
    baseString: 'Mary',
    dimension: 150,
    circular: true,
),

// Custom border radius
TinyAvatar(
    baseString: 'Elton John',
    dimension: 150,
    colourScheme: TinyAvatarColourScheme.seascape,
    borderRadius: 30,
),

// Custom colour scheme
TinyAvatar(
    baseString: 'Superman',
    dimension: 150,
    colourScheme: TinyAvatarColourScheme.summer,
    customColours: const [
        Colors.red,
        Colors.orange,
        Colors.orangeAccent,
        Colors.yellow
    ],
)

image


Additional information

Github: https://github.com/PeterTheSalmon/tiny_avatar

Want something added? Open an issue or pull request!

About

Simple, generated avatars for your Flutter app. Inspired https://www.tinygraphs.com

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages