colorful_text_avatar 1.0.5
colorful_text_avatar: ^1.0.5 copied to clipboard
A Flutter package to generate colorful text avatars based on user initials with enhanced support for Vietnamese characters. Forked from colorize-text-avatar.
Colorful Text Avatar #
Colorful Text Avatar is a Flutter package to generate colorful avatars based on user initials with enhanced support for Vietnamese characters. This package is a fork of colorize-text-avatar by Denis Çolak, with added Vietnamese character support and improved text processing.
✨ What's New #
- Vietnamese Character Support: Full support for Vietnamese diacritics and special characters
- Enhanced Text Processing: Better handling of non-Latin characters
- Improved Character Extraction: Smarter algorithm for extracting initials from Vietnamese names
Credits #
This package is based on the excellent work by Denis Çolak in the original colorize-text-avatar package. We've enhanced it to better support Vietnamese users while maintaining all the original functionality.
![]()
Getting Started 🔥 #
It is an easy and powerfull package to generate text avatars for your users!
Let's see how to generate an avatar easily!
Usage of Colorful Text Avatar 😎 #
Here is the only mandatory parameter is text.
TextAvatar(
text: "Nguyễn Văn A", // Now supports Vietnamese characters!
)
![]()
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: "Trần Thị B" // Vietnamese names work perfectly!
)
![]()
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,
)
![]()
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
textColor: Colors.white,
fontSize: 14,
fontWeight: FontWeight.w600,
upperCase: true,
backgroundColor: Colors.black,
numberLetters: 1,
text: "Lê Văn C", // Supports all Vietnamese characters
)
License #
2021