搜索插件、代码仓与 APP 分类

favorite_button 封面
插件详情v0.0.4

favorite_button

favorite_button 是一个 Flutter 库,允许您创建带有动画效果的心形和星形收藏按钮。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
327
喜欢数
65
Pub 分数
150

安装插件

flutter pub add favorite_button

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

favorite_button 是一个 Flutter 库,可帮助开发者轻松实现带有平滑动画效果的心形和星形收藏按钮。专为社交媒体和互动应用设计,通过在按下按钮时提供视觉反馈来增强用户参与度。该包支持 Android、iOS、Web、macOS、Windows 和 Linux 等多个平台,确保在不同设备上行为一致。通过 `flutter pub add favorite_button` 即可快速配置,无缝集成到现有项目中。非常适合用于点赞帖子、保存收藏或标记重要项目等功能。

适合场景

  • 点赞社交媒体帖子
  • 保存收藏项目
  • 将内容标记为重要
  • 用户偏好跟踪
  • 交互式应用元素
  • 游戏化功能

主要特点

  • 心形和星形按钮
  • 动画切换效果
  • 跨平台支持
  • 简单集成
  • 可自定义外观
  • 状态持久化

适合对象

  • 社交媒体应用
  • 内容书签工具
  • 用户偏好系统
  • 交互式 UI 组件
  • 移动和网络应用
  • 以参与度驱动的设计

使用建议

  • 限于心形和星形
  • 低端设备上的动画性能
  • 需要手动管理状态以实现持久化
  • 无内置数据存储
  • 基本样式之外的最小化自定义
  • 依赖外部源代码进行更新

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

favorite_button

Language: English

Favorite Button is a flutter library that allows you to create heart and star shaped favorite featured buttons with animation effects too.

How to use it.

the default effects is Icons.favorite

  FavoriteButton(
            valueChanged: (_) {
            },
          ),

and you can also define custom effects.

 FavoriteButton(
            valueChanged: (_isFavorite) {
              print('Is Favorite $_isFavorite)');
            },
          )

parameters

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
                                                                                                                                                           |

more detail

所属分类

源码仓库

使用此插件的项目

暂无相关数据。