FLUTTER ECOSYSTEM

gsioteam/flip_widget

gsioteam/flip_widget open-source repository details.

flip_widget 项目封面
Stars
41
Forks
22
最近推送(UTC)
2024年5月8日
项目状态
未归档
gsioteam GitHub avatar
GITHUB User

gsioteam ↗

语言DartRubySwiftKotlinObjective-C

此仓库发布的插件

使用的依赖

依赖清单 6 项
  • flutter{"sdk":"flutter"}
  • gl_canvas{"git":"https://github.com/gsioteam/gl_canvas.git"}
  • flip_renderer^0.0.1
  • opengl_es_bindings{"git":{"url":"https://github.com/gsioteam/opengl_es_bindings.git","ref":"e1c2d6fe06e8838388e9e3c94b66b912b818919e"}}
  • ffi^2.1.0
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

flip_widget

Flip your widget.

screenrecord

Usage

It is very easy to use.

FlipWidget(
    key: _flipKey,
    child: Container(
        color: Colors.blue,
        child: Center(
            child: Text("hello"),
        ),
    ),
)

//...
// Show effect layer.
_flipKey.currentState?.startFlip();
/// Update the effect layer
/// [percent] is the position for flipping at the bottom.
/// [tilt] is the `a` of `y = a*x + b`(line equation). 
_flipKey.currentState?.flip(percent, tilt);
/// Dismiss the effect layer and show the original widget.
_flipKey.currentState?.stopFlip();