[Day14] Flutter with GetX animated_text_kit

animated_text_kit

文字特殊效果的第三方,可以参考文档的样式作选择
https://ithelp.ithome.com.tw/upload/images/20210928/20140296nBPlWDqZzK.png

使用起来类似是Flutter原生的RichText & TextSpan, 但炫炮很多.

totalRepeatCount: 重复播放次数,
pause: 播放结束停几秒再开始下一轮,
stopPauseOnTap: 点下去的时候动画暂停,

这篇借用cached_network_image的页,下面剩余的空间摆

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('CachedImagePage')),
      body: SafeArea(
        child: SizedBox.expand(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Expanded(
                child: AnimatedTextKit(
                  animatedTexts: [
                    TypewriterAnimatedText(
                      'Hello world!',
                      textStyle: const TextStyle(
                        fontSize: 32.0,
                        fontWeight: FontWeight.bold,
                      ),
                      speed: const Duration(milliseconds: 500),
                    ),
                  ],
                  totalRepeatCount: 4,
                ),
              ),
              Expanded(
                child: AnimatedTextKit(
                  animatedTexts: [
                    FadeAnimatedText(
                      'Fade First',
                      textStyle: TextStyle(
                          fontSize: 32.0, fontWeight: FontWeight.bold),
                    ),
                    ScaleAnimatedText(
                      'Then Scale',
                      textStyle:
                          TextStyle(fontSize: 70.0, fontFamily: 'Canterbury'),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }

本篇的GitHub source code

下一篇将为大家介绍 Wrap & Chip


<<:  [Day 20] Mattermost - 自签凭证绑定 Docker版

>>:  android studio 30天学习笔记-day 13-介绍databinding BindingAdapter

[重构倒数第09天] - Vue-Cli + PurgeCSS 删除你用不到的CSS

前言 该系列是为了让看过Vue官方文件或学过Vue但是却不知道怎麽下手去重构现在有的网站而去规画的系...

Day 5 Swift语法-基础篇(3/5)-流程控制

今天我们来学习一下流程控制跟一些基本运算子吧~ 布林值:用来表达true或false的资料型态 宣告...

【第十四天 - Flutter 官方 CodeLab Get-To-Know 活动报名教学(上)】

前言 今日的程序码 => GITHUB 我很喜欢这篇 CodeLab,我自己认为,如果这篇的内...

21. 当一切未知时,该如何做决策?

前言 当你是junior时,每次交给你一个任务你大概可以想像要怎麽样达成目标,对於丢给你的问题,即...