FLUTTER ECOSYSTEM

YudizAndroidNareshP/Avatar-Plus

Avatar Plus 是一個 Flutter 套件,可讓您輕鬆產生並自訂獨特的頭像。最多可產生 120 億個獨一無二的頭像,此套件非常適合用於建立個人檔案圖片、遊戲標誌,或為您的設計專案增添個人化細節。

頭像-增強版 專案封面
Stars
11
Forks
1
最近推送(UTC)
2025年1月29日
專案狀態
未封存
YudizAndroidNaresh GitHub avatar
GITHUB User

YudizAndroidNaresh ↗

語言DartC++CMakeSwiftCHTMLKotlinObjective-C

技術主題

此儲存庫發佈的套件

使用的依賴

依賴清單 5 項
  • flutter{"sdk":"flutter"}
  • crypto^3.0.3
  • flutter_svg^2.0.0+1
  • flutter_test開發依賴{"sdk":"flutter"}
  • lints開發依賴^4.0.0

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

https://raw.githubusercontent.com/YudizAndroidNareshP/Avatar-Plus/main/screenshots/banner.png

pub package package publisher GitHub code size

Avatar Plus

https://raw.githubusercontent.com/YudizAndroidNareshP/Avatar-Plus/main/screenshots/logo.gif?v=001

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

https://raw.githubusercontent.com/YudizAndroidNareshP/Avatar-Plus/main/screenshots/demo.gif https://raw.githubusercontent.com/YudizAndroidNareshP/Avatar-Plus/main/screenshots/screen-1.png https://raw.githubusercontent.com/YudizAndroidNareshP/Avatar-Plus/main/screenshots/screen-2.png
'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