パッケージ、リポジトリ、アプリカテゴリを検索

flutter_boring_avatars のカバー
パッケージ詳細v2.1.0

flutter_boring_avatars

退屈なアバターは、ユーザー名とカラーパレットに基づいて独自のアバターを生成できます。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
2480
いいね数
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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。