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

super_profile_picture 封面
套件詳情v1.0.0

super_profile_picture

一個可自訂的 Flutter 小工具,用於顯示個人檔案圖片,支援圖像和文字選項。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
33
喜歡數
11
Pub 分數
150

安裝套件

flutter pub add super_profile_picture

套件介紹

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

Super Profile Picture 是一個可自定義的 Flutter 小部件,專門設計用於顯示個人資料圖片,支援圖像與文字頭像。它提供靈活的樣式、形狀選項,以及在圖像無法取得時的動態備援機制。非常適合用於社交應用、即時通訊平台或儀表板的使用者介面,確保跨裝置的一致視覺呈現。此小部件能順暢整合至 Flutter 項目中,並支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境

  • 使用者資料顯示
  • 聊天介面
  • 儀表板小部件
  • 社群媒體應用
  • 團隊成員列表

主要特色

  • 圖像和文字頭像支援
  • 可自訂的形狀和尺寸
  • 缺失圖片的備用文字
  • 平台無關設計
  • 與 Flutter 的輕鬆整合
  • 響應式佈局處理

適合對象

  • 開發社交應用的開發者
  • 需要一致頭像的UI設計師
  • 需要跨平台相容性的項目
  • 具有使用者個人檔案或通訊功能的應用程式
  • 希望擁有可重用頭像組件的團隊

使用建議

  • 需要為遠程 URL 設置圖像加載
  • 僅限基礎頭像功能
  • 無內建的從姓名產生頭像功能
  • 可能需要額外的樣式來處理複雜的使用者介面
  • 依賴外部圖像加載庫

原始 README

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

logo

License: MIT pub package GitHub popularity version

A customizable Flutter widget for displaying profile pictures, supporting both image and text options. It will show label text in case the image is not provided or fails to load. You can use any image provider, such as NetworkImage, AssetImage, and more, to display the image.

Live Demo & Experiment Page

Live demo: Demo & Experiment site

Installation

i. Add the latest version of this package to your pubspec.yaml file, and run: 'dart pub get':

dependancies:
  super_profile_picture: ^1.0.0

ii. Import the package in your Flutter App and use it.

import 'package:super_profile_picture/super_profile_picture.dart';

Note

The background color will be set according to the first letter of the label. Customization of the background color is not currently supported but may be added in the future.

Code Sample

Default

Screenshot_161 Screenshot_160

SuperProfilePicture(
    label: "Super Profile Picture",
    radius: 30,
);
SuperProfilePicture(
    label: "Super Profile Picture",
    radius: 30,
    image: NetworkImage("https://picsum.photos/200/300.jpg"),

);
Max Label Length

Screenshot_162


SuperProfilePicture(
    label: "Super Profile Picture",
    radius: 30,
    textDecorationProperties: TextDecorationProperties(
         maxLabelLength: 3,  
    ),
);
Empty Name / Blank

Screenshot_163

SuperProfilePicture(
    label: "",
    radius: 30,
);
With Border

Screenshot_164 Screenshot_165

SuperProfilePicture(
    label: "Super Profile Picture",
    radius: 30,
    border: Border.all(width: 6, color: Colors.blue),
);
SuperProfilePicture(
    label: "Super Profile Picture",
    radius: 30,
    image: NetworkImage("https://picsum.photos/200/300.jpg"),
    border: Border.all(width: 6, color: Colors.blue),

);

Properties

  • label
  • radius
  • textDecorationProperties
    • fontSize;
    • maxLabelLength;
    • useFittedBox;
    • fontColor;
    • fontWeight;
    • letterSpacing;
    • padding;
    • fontStyle;
  • imageDecorationProperties
    • frameBuilder;
    • loadingBuilder;
    • errorBuilder;
    • semanticLabel;
    • excludeFromSemantics;
    • width;
    • height;
    • color;
    • opacity;
    • colorBlendMode;
    • fit;
    • alignment;
    • repeat;
    • centerSlice;
    • matchTextDirection;
    • gaplessPlayback;
    • isAntiAlias;
    • filterQuality;
  • border
  • borderRadius
  • image
  • clipBehavior

Future Tasks

  • Add customizable background color function.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。