v1.0.3profile_photo
一个简单的 Flutter 包,用于显示带有徽章的个人资料照片
13喜欢 108近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
bradv123/profile_photo open-source repository details.
以下为英文项目原文快照,最新内容请访问 GitHub。
Creates a widget that was designed to be used to display a profile photo, but it could also be used in many other ways
Add the dependency and add anywhere in widget tree
Minimum required code for a simple round photo (2nd example)
ProfilePhoto(
totalWidth: 100,
cornerRadius: 80,
color: Colors.blue,
image: const AssetImage('assets/test_profile_photo.jpg'),
),
More complicated example with initals shown, custom boarder and colors, and badge (3rd example)
ProfilePhoto(
totalWidth: 200,
cornerRadius: 25,
color: Colors.blue,
outlineColor: Colors.red,
outlineWidth: 10,
textPadding: 10,
name: 'Brad Varnum',
fontColor: Colors.white,
nameDisplayOption: NameDisplayOptions.initials,
fontWeight: FontWeight.w100,
showName: true,
image: const AssetImage('assets/test_profile_photo.jpg'),
badgeAlignment: Alignment.bottomLeft,
badgeSize: 60,
badgeImage: const AssetImage('assets/star.png'),
onTap: () {
// open profile for example
},
onLongPress: () {
// popup to message user for example
},
),
依赖清单 2 项
{"sdk":"flutter"}{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗