FLUTTER ECOSYSTEM

ThomasEcalle/delayed_display

一个控件,可让您在延迟后显示子控件,并带有精美的淡入淡出和滑动动画。

delayed_display 项目封面
Stars
30
Forks
7
最近推送(UTC)
2021年7月5日
项目状态
未归档
Ecalle Thomas GitHub avatar
GITHUB User

Ecalle Thomas ↗

语言DartHTMLSwiftKotlinObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

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

展开 / 收起项目 README

delayed_display

A widget that enables you to display a child after a delay and with beautiful fading and sliding animation.

examples

https://raw.githubusercontent.com/ThomasEcalle/delayed_display/master/documentation/horizontal.gif https://raw.githubusercontent.com/ThomasEcalle/delayed_display/master/documentation/vertical.gif

How does it works

All you have to do is to use the widget DelayedDisplay like this for example :

DelayedDisplay(
  delay: Duration(seconds: 1),
  child: Text(
    "Hello",
    style: TextStyle(
      fontWeight: FontWeight.bold,
      fontSize: 35.0,
      color: Colors.white,
    ),
  ),
),

And ... That's all ! It will automatically handle fading and sliding animation and will make the Text appear after 1 second delay.

Let's customize it !

Here are the accepted parameters :

Name Type Usage Required Default Value
child Widget The Widget that needs to appear yes null
delay Duration The duration before showing the widget (and animating it) false null
fadingDuration Duration The duration of the fading animation false const Duration(milliseconds: 800)
slidingCurve Curve The curve of the sliding animation false Curves.decelerate
slidingBeginOffset Offset The offset from where the sliding animation will start false const Offset(0.0, 0.35)