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

flutter_flip_card 封面
插件详情v0.0.6

flutter_flip_card

一个提供翻转卡片动画的组件。可用于隐藏和显示产品的详细信息。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
6780
喜欢数
160
Pub 分数
150

安装插件

flutter pub add flutter_flip_card

插件介绍

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

一个 Flutter 包,可实现翻转卡片动画,让用户通过流畅的翻转效果揭示隐藏内容,例如产品详情。适用于信息分层显示的交互式 UI,支持 Android、iOS、Web、macOS、Windows 和 Linux 多个平台。该组件轻量且易于集成,适合电商应用、作品集或任何需要引人入胜过渡效果的界面。

适合场景

  • 产品详情揭示
  • 互动学习卡片
  • 投资组合项目展示
  • 游戏卡翻转
  • 用户资料切换

主要特点

  • 平滑翻转动画
  • 可自定义的正面和背面
  • 跨平台支持
  • 与现有控件的轻松集成
  • 可配置的翻转方向和速度

适合对象

  • 电子商务应用程序
  • 教育类应用
  • 交互式用户界面原型
  • 移动和Web仪表板
  • 游戏化界面

使用建议

  • 可能影响低端设备的性能
  • 超出基本翻转效果的自定义功能有限
  • 需要仔细处理状态管理
  • 不适合复杂的多层动画
  • 最适合简单的、单一用途的翻转交互

原始 README

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

flutter_flip_card

A widget that does transition between two children in a flipping manner.

FlipCard GestureFlipCard
FlipCard GestureFlipCard

How to Use

To use flutter_flip_card, first start by importing the package.

import 'package:flutter_flip_card/flutter_flip_card.dart';

Currently Available Methods

  • FlipCard A component that provides a flip card animation

  • GestureFlipCard A component that provides a gsture(Swipe) flip card animation

FlipCard

    FlipCard(
        rotateSide: RotateSide.bottom,
        onTapFlipping: false, //When enabled, the card will flip automatically when touched.
        axis: FlipAxis.horizontal,
        controller: con1,
        frontWidget: Center(
        child: Container(
            height: 200,
            width: 140,
            child: Image.asset(
                    'image/01.png',
                    fit: BoxFit.fitHeight)
                )
            ),
        backWidget: Container(
            height: 200,
            width: 140,
            child: Image.asset(
                    `'image/02.jpg',
                    fit: BoxFit.fitHeight)
            )
        )
        
    final controller = FlipCardController();
    // Flip the card programmatically
    controller.flipcard();

GestureFlipCard

    GestureFlipCard(
            animationDuration: const Duration(milliseconds: 300),
            axis: FlipAxis.horizontal,
            controller:cong // used to ccontrol the Gesture flip programmatically
            enableController : false // if [True] if you need flip the card using programmatically
            frontWidget: Center(
                child: Container(
                  width: 300,
                  height: 200,
                  child: Image.asset(
                    'image/011.jpg',
                    fit: BoxFit.contain,
                  ),
                ),
              ),
            backWidget: Container(
                width: 300,
                height: 200,
                child: Image.asset(
                  'image/11.jpg',
                  fit: BoxFit.contain,
                ),
            ),
        ),
Project Created & Maintained By
Gunanithi

Passionate #Flutter, #Android Developer. #UI Designer.

linkedin medium

Notes

Please open an issue if you find any bugs.

Donate

You like the package ? Buy me a coffee :)

Buy Me A Coffee

所属分类

源码仓库

使用此插件的项目