패키지, 저장소 및 앱 카테고리 검색

flutter_boring_avatars 표지
패키지 상세v2.1.0

flutter_boring_avatars

지루한 아바타는 사용자 이름과 색상 팔레트를 기반으로 고유한 아바타를 생성할 수 있습니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
2.5천
좋아요
54
Pub 점수
160

패키지 설치

flutter pub add flutter_boring_avatars

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter Boring Avatars는 사용자 이름과 색상 팔레트에서 고유하고 시각적으로 구분 가능한 아바타를 생성합니다. 외부 이미지 소스에 의존하지 않고 앱 내에서 프로필 사진을 간단하고 커스터마이징 가능한 방식으로 표시할 수 있습니다. 알고리즘적으로 생성되어 플랫폼 간 일관성과 고유성을 보장합니다. 채팅 인터페이스, 사용자 프로필 또는 깔끔하고 미니멀한 아바타 솔루션이 필요한 모든 앱에 적합합니다. Android, iOS, Web, macOS, Windows, Linux 등 주요 Flutter 플랫폼을 모두 지원합니다.

사용 사례

  • 사용자 프로필 표시
  • 채팅 인터페이스
  • 익명 사용자 표현
  • 미니멀리스트 UI 디자인
  • 다중 사용자 대시보드

주요 기능

  • 사용자 이름 기반 아바타 생성
  • 사용자 지정 가능한 색상 팔레트
  • 크로스 플랫폼 지원
  • 고유한 아바타 패턴
  • 경량이며 쉽게 통합 가능

적합한 대상

  • 간단한 프로필 사진이 필요합니다
  • 많은 사용자가 있는 앱
  • 디자인 중심 애플리케이션
  • 저 대역폭 환경
  • 프로토타이핑 및 MVP

고려 사항

  • 색상과 사용자 이름 외에는 맞춤 설정이 제한적입니다
  • 브랜드 아바타에 적합하지 않습니다
  • 내장된 이미지 백업 없음
  • 유일성을 위해 결정론적 알고리즘에 의존

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Github

flutter_boring_avatars

Pub Version (including pre-releases)

English | 中文

Features

Boring avatars can generate unique avatars based on the username and color palette.

This project is a Flutter implementation of Boring Avatars.

It differs from the original project in its implementation, using Canvas for rendering and adding transition animations.

Check out the Web Demo to experience the effect.

Screenshots

preview1.png

Installation

Add the dependency in your pubspec.yaml file:

dependencies:
  flutter_boring_avatars: any # or the latest version on Pub

Usage

Get a simple avatar

BoringAvatar(name: "Maria Mitchell", type: BoringAvatarType.marble);

Get an animated avatar that has a nice transition animation when the name changes

AnimatedBoringAvatar(
  name: "Maria Mitchell",
  type: BoringAvatarType.marble,
  duration: const Duration(milliseconds: 300),
)

Get an avatar with a custom color palette

final colorPalette = BoringAvatarPalette(Color(0xffA3A948), Color(0xffEDB92E), Color(0xffF85931), Color(0xffCE1836), Color(0xff009989));

BoringAvatar(name: "Maria Mitchell", palette: colorPalette);

Set default type and palette, applicable only for BoringAvatar and AnimatedBoringAvatar

build(context) {
  return DefaultBoringAvatarStyle(
    type: BoringAvatarType.marble, 
    palette: colorPalette,
    child: Column(
      children: [
        BoringAvatar(name: "Maria Mitchell"),
        BoringAvatar(name: "Alexis Brooks"),
        BoringAvatar(name: "Justin Gray"),
      ]
    ),
  );
}

Use ShapeBorder to control the avatar shape and add a border

BoringAvatar(
  name: "Maria Mitchell",
  type: BoringAvatarType.marble,
  shape: OvalBorder(), // or RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))
);

Use the avatar for Decoration, it also supports transition animations when used in AnimatedContainer

Container(
  decoration: BoringAvatarDecoration(
    avatarData: BoringAvatarData.generate(name: name),
  ),
);

Export the avatar as an image

final avatarData = BoringAvatarData.generate(name: name);
final image = await avatarData.toImage(size: const Size.square(256));
final pngByteData = await image.toByteData(format: ImageByteFormat.png);

Thanks

Thanks to the developers of Boring Avatars.

The example uses the beautiful palette project from Matt DesLauriers.

If you like this project, please give me a star.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.