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

flutter_reaction_button 封面
插件详情v3.0.0+3

flutter_reaction_button

Flutter Reaction Button 是一个可定制的 Flutter 包,可让您轻松创建带有反应表情符号的交互式按钮,类似于 Facebook 的标志性反应按钮。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
166
喜欢数
316
Pub 分数
140

安装插件

flutter pub add flutter_reaction_button

插件介绍

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

Flutter Reaction Button 是一个可自定义的包,使开发者能够在 Flutter 应用中实现交互式表情反应按钮,模仿 Facebook 等社交媒体平台流行的互动风格。它支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台。该包允许轻松集成自定义表情符号、动画以及用户交互的回调处理。适用于消息或内容分享应用中的点赞、反应或反馈机制等社交功能。

适合场景

  • 社交媒体应用互动
  • 用户反馈系统
  • 消息应用反应按钮
  • 内容互动功能
  • 交互式 UI 元素

主要特点

  • 可自定义的表情符号集
  • 流畅的动画效果
  • 跨平台支持
  • 反应选择的回调
  • 与现有用户界面的轻松集成

适合对象

  • 开发社交应用的开发者
  • 寻求交互元素的UI设计师
  • 需要用户参与功能的应用程序
  • 具有多平台部署的项目

使用建议

  • 可能会略微增加捆绑大小
  • 需要仔细选择表情符号以符合上下文
  • 动画性能在低端设备上有所不同
  • 仅限表情符号反应

原始 README

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

pub package

Flutter reaction button

Flutter Reaction Button is a customizable Flutter package that allows you to easily create interactive buttons with reaction emojis, similar to Facebook's iconic reaction buttons.

Screenshot

App Screenshot

Installation

# pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  flutter_reaction_button: <last-version>

Usage

import 'package:flutter_reaction_button/flutter_reaction_button.dart';

ReactionButton<String>(
    onReactionChanged: (Reaction<String>? reaction) {
        debugPrint('Selected value: ${reaction?.value}');
    },
    reactions: <Reaction<String>>[
        Reaction<String>(
            value: 'like',
            icon: widget,
        ),
        Reaction<String>(
            value: 'love',
            icon: widget,
        ),
        ...
    ],
    initialReaction: Reaction<String>(
        value: 'like',
        icon: widget,
    ),
    selectedReaction: Reaction<String>(
        value: 'like_fill',
        icon: widget,
    ),
)

License

MIT License

Copyright (c) 2023 Abdelouahed Medjoudja

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

所属分类

源码仓库

使用此插件的项目