搜尋套件、儲存庫與 APP 分類

avatar_plus 封面
套件詳情v0.0.5

avatar_plus

一個多功能的 Flutter 套件,用於產生和顯示具有隨機字串內容的可自訂頭像。非常適合使用者個人檔案、佔位符等用途。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1000
喜歡數
54
Pub 分數
140

安裝套件

flutter pub add avatar_plus

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Avatar Plus 是一個 Flutter 套件,專門用於使用隨機字串內容產生和顯示可自訂頭像。它支援多種視覺風格,非常適合使用者個人檔案、即時通訊介面和佔位圖像。此套件能跨多個平台無縫整合,提供外觀上的彈性和使用便利性。透過最少的設定,開發者可快速實作可動態調整的頭像,以適應不同情境與設計需求。

適用情境

  • 使用者個人檔案圖片
  • 聊天頭像顯示
  • 佔位符圖像
  • 儀表板用戶指標
  • 入門畫面
  • 團隊成員卡片

主要特色

  • 基於隨機字串的頭像產生
  • 可自定義的形狀和顏色
  • 對多個平台的支援
  • 與 Flutter 的輕鬆整合
  • 可設定的文字與首字母
  • 響應式設計

適合對象

  • 需要快速頭像的應用開發者
  • 尋求一致的個人資料視覺效果的UI設計師
  • 具有動態用戶數據的項目
  • 跨平台應用程式
  • 原型設計和最小可行產品開發

使用建議

  • 限於文字類頭像
  • 無內建影像上傳支援
  • 依賴字串輸入以確保唯一性
  • 可能需要自定樣式以實現複雜設計
  • 未針對大規模頭像圖庫進行優化

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

pub package package publisher GitHub code size

Avatar Plus

Avatar Plus is a Flutter wrapper for Multiavatar that allows you to generate and customize unique avatars easily. With up to 12 billion unique avatars possible, this package is perfect for creating profile pictures, gaming logos, or adding personalized touches to your design projects.

Features

  • Generate Unique Avatars: Create avatars based on any text input with just a click or a keyboard shortcut.
  • Customizable: Integrate and customize avatars in your Flutter applications.
  • Randomized Associations: Names and words are randomly assigned to avatars, ensuring each one is unique.
  • Free to Use: Use any generated avatar freely across various applications.

Demo

'Screen 1' 'Screen 3' 'Screen 2'

Sample Code

Here is a basic example demonstrating how to use the avatar_plus package with various customization options:

AvatarPlus("Jonny")            

Installation

Add the following line to your pubspec.yaml file under dependencies:

dependencies:
  avatar_plus: ^1.0.0

Then run:

flutter pub get

Usage

To use Avatar Plus in your Flutter application:

Import the Package
import 'package:avatar_plus/avatar_plus.dart';
Basic Example

Here's a simple example of how to generate an avatar using Avatar Plus:

import 'package:flutter/material.dart';
import 'package:avatar_plus/avatar_plus.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Avatar Plus example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: const Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisSize: MainAxisSize.min,
        children: [
          Text(
            "Avatar Plus",
            style: TextStyle(fontSize: 40),
          ),
          Text("Yudiz Solutions Limited © 2024"),
          SizedBox(
            height: 20,
          )
        ],
      ),
      body: Center(
        child: AvatarPlus(
          "jonny",
          height: MediaQuery.of(context).size.width - 20,
          width: MediaQuery.of(context).size.width - 20,
        ),
      ),
    );
  }
}
Additional Usage Examples

You can generate avatars in various formats using Avatar Plus:

1. Get Avatar as a String
String svgCode = AvatarPlusGen.instance.generate("Jonny");
2. Get Avatar String with Transparent Background
String svgCode = AvatarPlusGen.instance.generate("Jonny", trBackground: true);
3. Get Avatar as an SVG Widget
Widget svgWidget = AvatarPlus("Jonny", height: 100, width: 100);
4. Get Avatar SVG Widget with Transparent Background
Widget svgWidget = AvatarPlus("Jonny", trBackground: true, height: 100, width: 100);

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributors

All Contributors

YudizAndroidNaresh
YudizAndroidNaresh

🚇 ⚠️ 💻

Contributions

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository if you would like to contribute to Avatar Plus.

Support

If you encounter any issues or have questions, feel free to open an issue on GitHub.

Visitors Count

Loading

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。