Animated-Text-Kit Flutter 字体动画包开源项目

我要开发同款
匿名用户2018年12月18日
231阅读

技术信息

开源地址
https://github.com/aagarwal1012/Animated-Text-Kit
授权协议
MIT

作品详情

一个包含很多炫酷字体动画的Flutter软件包。

安装1.添加依赖

把软件包添加到pubspec.yaml文件中:

depedecies: aimated\_text\_kit: ^1.2.0

2.安装

你可以通过下列的命令行来安装:

通过pub:

$ pub get

通过Flutter:

$ flutter packages get

3.引用

把软件包引入到dart文件

import 'package:aimated\_text\_kit/aimated\_text\_kit.dart';

用例:

你可以在AimatedTextKit类中重写并设置duratio的时间。如果动画不需要重复播放,你可以改变isRepeatigAimatio为Flase:

FadeAimatedTextKit(  duratio: Duratio(millisecods: 5000),  isRepeatigAimatio: false,  text: \["do IT!", "do it RIGHT!!", "do it RIGHT NOW!!!"\],  textStyle: TextStyle(fotSize: 32.0, fotWeight: FotWeight.bold),);

Rotate

Row(  maiAxisSize: MaiAxisSize.mi,  childre: <Widget>\[    SizedBox(width: 20.0, height: 100.0),    Text(      "Be",      style: TextStyle(fotSize: 43.0),    ),    SizedBox(width: 20.0, height: 100.0),    RotateAimatedTextKit(      oTap: () {        prit("Tap Evet");      },      text: \["AWESOME", "OPTIMISTIC", "DIFFERENT"\],      textStyle: TextStyle(fotSize: 40.0, fotFamily: "Horizo"),    ),  \],);

Note: 你可以通过在RotateAimatedTextKit类中设置trasitioHeight的值来改变文字变化的高度。

Fade

SizedBox(  width: 250.0,  child: FadeAimatedTextKit(    oTap: () {        prit("Tap Evet");      },    text: \[      "do IT!",      "do it RIGHT!!",      "do it RIGHT NOW!!!"    \],    textStyle: TextStyle(        fotSize: 32.0,         fotWeight: FotWeight.bold    ),  ),);

Typer

SizedBox(  width: 250.0,  child: TyperAimatedTextKit(    oTap: () {        prit("Tap Evet");      },    text: \[      "It is ot eough to do your best,",      "you must kow what to do,",      "ad the do your best",      "\- W.Edwards Demig",    \],    textStyle: TextStyle(        fotSize: 30.0,        fotFamily: "Bobbers"    ),  ),);

Typewriter

SizedBox(  width: 250.0,  child: TypewriterAimatedTextKit(    oTap: () {        prit("Tap Evet");      },    text: \[      "Disciplie is the best tool",      "Desig first, the code",      "Do ot patch bugs out, rewrite them",      "Do ot test bugs out, desig them out",    \],    textStyle: TextStyle(        fotSize: 30.0,        fotFamily: "Age"    ),  ),);

Scale

SizedBox(  width: 250.0,  child: ScaleAimatedTextKit(    oTap: () {        prit("Tap Evet");      },    text: \[      "Thik",      "Build",      "Ship"      \],    textStyle: TextStyle(        fotSize: 70.0,        fotFamily: "Caterbury"    ),  ),);

Colorize

SizedBox(  width: 250.0,  child: ColorizeAimatedTextKit(    oTap: () {        prit("Tap Evet");      },    text: \[      "Larry Page",      "Bill Gates",      "Steve Jobs",    \],    textStyle: TextStyle(        fotSize: 50.0,         fotFamily: "Horizo"    ),    colors: \[      Colors.purple,      Colors.blue,      Colors.yellow,      Colors.red,    \],  ),);

Note: colors listshouldcotaisatleasttwovalues.

BugsorRequests

如果你有任何问题欢迎提issue.如果你感觉这个库还需要完善欢迎提 ticket 。

Licese

Aimated-Text-Kitisliceseduder MITlicese.View licese.

功能介绍

一个包含很多炫酷字体动画的 Flutter 软件包。 安装 1. 添加依赖 把软件包添加到 pubspec.yaml文件中: dependencies: animated\_text\_kit:...

示例图片

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论