FLUTTER ECOSYSTEM

ch-muhammad-adil/flutter-plugin-circular_profile_avatar

CircularProfileAvatar 是一個 Flutter 套件,讓開發者可以實現帶有邊框、覆蓋層、首字母文字等許多出色功能的圓形頭像,簡化開發人員的工作。這是 Flutter 內建 CircleAvatar 小部件的替代方案。

flutter-plugin-circular_profile_avatar 專案封面
Stars
86
Forks
23
最近推送(UTC)
2022年3月11日
專案狀態
未封存
Muhammad Adil GitHub avatar
GITHUB User

Muhammad Adil ↗

Experienced iOS/android developer with 9+ years of experience in both platforms and 5 years of experience in Flutter cross platform. Front-end Developer at ALP.

AppstreeLahore, Punjab官方網站 ↗
語言DartRubyHTMLShellJavaSwiftKotlinObjective-C

技術主題

使用的依賴

依賴清單 3 項

原始 README

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

展開 / 收合專案 README

circular_profile_avatar

CircularProfileAvatar is a Flutter package which allows developers to implement circular profile avatar with border, overlay, initialsText and many other awesome features, which simplifies developers job. It is an alternative to Flutter's CircleAvatar Widget.

https://raw.githubusercontent.com/ch-muhammad-adil/flutter-plugin-circular_profile_avatar/HEAD/screenshots/Screenshot.png

Usage

    CircularProfileAvatar(
          'https://avatars0.githubusercontent.com/u/8264639?s=460&v=4', //sets image path, it should be a URL string. default value is empty string, if path is empty it will display only initials
          radius: 100, // sets radius, default 50.0              
          backgroundColor: Colors.transparent, // sets background color, default Colors.white
          borderWidth: 10,  // sets border, default 0.0
          initialsText: Text(
            "AD",
            style: TextStyle(fontSize: 40, color: Colors.white),
          ),  // sets initials text, set your own style, default Text('')
          borderColor: Colors.brown, // sets border color, default Colors.white
          elevation: 5.0, // sets elevation (shadow of the profile picture), default value is 0.0
          foregroundColor: Colors.brown.withOpacity(0.5), //sets foreground colour, it works if showInitialTextAbovePicture = true , default Colors.transparent
          cacheImage: true, // allow widget to cache image against provided url
          imageFit = BoxFit.cover,  
          onTap: () {
            print('adil');
          }, // sets on tap 
          showInitialTextAbovePicture: true, // setting it true will show initials text above profile picture, default false  
          )
    )

If you want to use AssetImage or any other resource than just pass that to Child parameter. It will be shown at priority.

    CircularProfileAvatar(
                    '',
                    child: FlutterLogo(),
                    borderColor: Colors.purpleAccent,
                    borderWidth: 5,
                    elevation: 2,
                    radius: 50,
                  ),

If this project help you reduce time to develop, you can give me a cup of coffee :)

Give me through Paypal ->

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.