Git Product home page Git Product logo

acter-avatar's Introduction

Acter Avatar

Acter Avatar is a package to generate avatar for the acter platform.

Progress

  • TextAvatars based on text with custom color generator
  • [-] Generic ActerAvatar with:
    • automatic selection of shape & mode
    • image loader
    • optional border-support (with optional coloring support)
    • multiavatar fallback support
  • Generic ActerAvatarPill for inline displaying with:
    • internal ActerAvatar, click-action

Components:

TextAvatar can generate avatars based on any string. It generates the background and foreground color based on your input string and shows the avatar via the text initials. Enjoy it!

Acter Text Avatar

Getting Started 🔥

It is an easy and powerful package to generate text avatars for your users!

Let's see how to generate an avatar easily!

Usage of Acter's Text Avatar 😎

Here is the only mandatory parameter is text.

TextAvatar(
    text: "Deniz Çolak",
)

Acter Text Avatar

Parameters of Text Avatar 😎

Here is the predefined shapes: Rectangle, Circular or None, if shape is null or not defined the default value similar with Rectangle but not same.

Shape.Rectangle, Shape.Circular, Shape.None can be use.

TextAvatar(
    shape: Shape.Circular,
    text: "Deniz Çolak"
)

Acter Text Avatar

numberLetters parameter allows user to generate Avatar more specific number of character.

Developer can predefine size and numberLetters, if numberLetters is null or not defined the default value is 1.

TextAvatar(
    shape: Shape.Rectangle,
    size: 35,
    numberLetters: 2,

)

Acter Text Avatar

Other parameters can be change according to your specification.

Developers can extend the TextAvatar model according to their specification, currently below parameters are supported.

TextAvatar(
    shape: Shape.Circular,
    size: 35
    fontSize: 14,
    fontWeight: FontWeight.w600,
    upperCase: true,
    colorMaker: ColorMaker.bold(),
    colorGenerator: // custom ColorGenerator-function. colorMaker takes precedence
    numberLetters: 1,

    text: this.widget.userdata.displayname,
    sourceText: this.widget.userdata.username,
)

Credits & License

License

Fork of the great Colorize Text Avatar package by Deniz Çolak.

Any additional work: © 2023 Acter Association, Denmark

acter-avatar's People

Contributors

gnunicorn avatar gtalha07 avatar deniscolak avatar christianguevara avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.