v0.0.4favorite_button
favorite_button 是一个 Flutter 库,允许您创建带有动画效果的心形和星形收藏按钮。
65喜欢 318近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
收藏按钮是一个Flutter库,可让您创建带有动画效果的心形和星形收藏特色按钮
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
Language: English
Favorite Button is a flutter library that allows you to create heart and star shaped favorite featured buttons with animation effects too.
https://github.com/TeaTalkInternal/github_assets/blob/master/gifs/video-to-gif-converter.gif
the default effects is Icons.favorite
FavoriteButton(
valueChanged: (_) {
},
),
and you can also define custom effects.
FavoriteButton(
valueChanged: (_isFavorite) {
print('Is Favorite $_isFavorite)');
},
)
| parameter | description | default |
|---|---|---|
| iconSize | size of button widget | 60.0 |
| iconColor | color of button widget | red for heart and yellow for star button respectively |
| valueChanged | Function that returns boolean value for current state of button | This is a required parameter |
| isFavorite or isStarred | Default state of button | This is a optional parameter |
|