GithubHelp home page GithubHelp logo

aagarwal1012 / animated-text-kit Goto Github PK

View Code? Open in Web Editor NEW
1.6K 26.0 304.0 17.89 MB

๐Ÿ”” A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]

Home Page: https://animated-text-kit.web.app

License: MIT License

Objective-C 0.06% Dart 96.91% Kotlin 0.18% Swift 0.58% HTML 2.27%
animation text-animation flutter flutter-package material-design dart animated-text-kit

animated-text-kit's Introduction

Animated Text Kit

A flutter package which contains a collection of some cool and awesome text animations. Recommended package for text animations in Codemagic's Ebook, "Flutter libraries we love". Try out our live example app.


Platform Pub Package Build Status
Codecov Coverage License: MIT Awesome Flutter Donate


Table of contents

Flutter Package of the Week

Flutter Package of the Week

Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  animated_text_kit: ^4.2.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

3. Import it

Now in your Dart code, you can use:

import 'package:animated_text_kit/animated_text_kit.dart';

Usage

AnimatedTextKit is a Stateful Widget that produces text animations. Include it in your build method like:

AnimatedTextKit(
  animatedTexts: [
    TypewriterAnimatedText(
      'Hello world!',
      textStyle: const TextStyle(
        fontSize: 32.0,
        fontWeight: FontWeight.bold,
      ),
      speed: const Duration(milliseconds: 2000),
    ),
  ],
  
  totalRepeatCount: 4,
  pause: const Duration(milliseconds: 1000),
  displayFullTextOnTap: true,
  stopPauseOnTap: true,
)

It has many configurable properties, including:

  • pause โ€“ the time of the pause between animation texts
  • displayFullTextOnTap โ€“ tapping the animation will rush it to completion
  • isRepeatingAnimation โ€“ controls whether the animation repeats
  • repeatForever โ€“ controls whether the animation repeats forever
  • totalRepeatCount โ€“ number of times the animation should repeat (when repeatForever is false)

There are also custom callbacks:

  • onTap โ€“ This is called when a user taps the animated text
  • onNext(int index, bool isLast) โ€“ This is called before the next text animation, after the previous one's pause
  • onNextBeforePause(int index, bool isLast) โ€“ This is called before the next text animation, before the previous one's pause
  • onFinished - This is called at the end, when the parameter isRepeatingAnimation is set to false

Note: You might come up with an issue that the text does not get updated with setState as shown here. The solution to this, is a key that changes based on the text. For reference, watch this video.

New with Version 3

Version 3 refactored the code so that common animation controls were moved to AnimatedTextKit and all animations, except for TextLiquidFill, extend from AnimatedText. This saved hundreds of lines of duplicate code, increased consistency across animations, and makes it easier to create new animations.

It also makes the animations more flexible because multiple animations may now be easily combined. For example:

AnimatedTextKit(
  animatedTexts: [
    FadeAnimatedText(
      'Fade First',
      textStyle: TextStyle(fontSize: 32.0, fontWeight: FontWeight.bold),
    ),
    ScaleAnimatedText(
      'Then Scale',
      textStyle: TextStyle(fontSize: 70.0, fontFamily: 'Canterbury'),
    ),
  ],
),

Using the legacy FadeAnimatedTextKit is equivalent to using AnimatedTextKit with FadeAnimatedText. An advantage of AnimatedTextKit is that the animatedTexts may be any subclass of AnimatedText, while using FadeAnimatedTextKit essentially restricts you to using just FadeAnimatedText.

Legacy AnimatedTextKit classes

Have you noticed that animation classes come in pairs? For example, there is FadeAnimatedText and FadeAnimatedTextKit. The significant refactoring with Version 3 split the original FadeAnimatedTextKit into FadeAnimatedText and a re-usable AnimatedTextKit, then FadeAnimatedTextKit was adjusted for backwards compatibility.

When introducing a new AnimationText subclass, you may wonder if you also need to also introduce an additional Kit class. The answer is NO. ๐ŸŽ‰

Going forward, we are championing the adoption of the Version 3 approach, and have deprecated the legacy Kit classes. This will make creating new animations easier. We know it makes some legacy code more verbose, but the flexibility and simplicity is a conscious trade-off.

Animations

Many animations are provided, but you can also create your own animations.

Rotate

Row(
  mainAxisSize: MainAxisSize.min,
  children: <Widget>[
    const SizedBox(width: 20.0, height: 100.0),
    const Text(
      'Be',
      style: TextStyle(fontSize: 43.0),
    ),
    const SizedBox(width: 20.0, height: 100.0),
    DefaultTextStyle(
      style: const TextStyle(
        fontSize: 40.0,
        fontFamily: 'Horizon',
      ),
      child: AnimatedTextKit(
        animatedTexts: [
          RotateAnimatedText('AWESOME'),
          RotateAnimatedText('OPTIMISTIC'),
          RotateAnimatedText('DIFFERENT'),
        ],
        onTap: () {
          print("Tap Event");
        },
      ),
    ),
  ],
);

Note: You can override transition height by setting the value of parameter transitionHeight for RotateAnimatedTextKit class.

Fade

return SizedBox(
  width: 250.0,
  child: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 32.0,
      fontWeight: FontWeight.bold,
    ),
    child: AnimatedTextKit(
      animatedTexts: [
        FadeAnimatedText('do IT!'),
        FadeAnimatedText('do it RIGHT!!'),
        FadeAnimatedText('do it RIGHT NOW!!!'),
      ],
      onTap: () {
        print("Tap Event");
      },
    ),
  ),
);

Typer

return SizedBox(
  width: 250.0,
  child: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 30.0,
      fontFamily: 'Bobbers',
    ),
    child: AnimatedTextKit(
      animatedTexts: [
        TyperAnimatedText('It is not enough to do your best,'),
        TyperAnimatedText('you must know what to do,'),
        TyperAnimatedText('and then do your best'),
        TyperAnimatedText('- W.Edwards Deming'),
      ],
      onTap: () {
        print("Tap Event");
      },
    ),
  ),
);

Typewriter

return SizedBox(
  width: 250.0,
  child: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 30.0,
      fontFamily: 'Agne',
    ),
    child: AnimatedTextKit(
      animatedTexts: [
        TypewriterAnimatedText('Discipline is the best tool'),
        TypewriterAnimatedText('Design first, then code'),
        TypewriterAnimatedText('Do not patch bugs out, rewrite them'),
        TypewriterAnimatedText('Do not test bugs out, design them out'),
      ],
      onTap: () {
        print("Tap Event");
      },
    ),
  ),
);

Scale

return SizedBox(
  width: 250.0,
  child: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 70.0,
      fontFamily: 'Canterbury',
    ),
    child: AnimatedTextKit(
      animatedTexts: [
        ScaleAnimatedText('Think'),
        ScaleAnimatedText('Build'),
        ScaleAnimatedText('Ship'),
      ],
      onTap: () {
        print("Tap Event");
      },
    ),
  ),
);

Colorize

const colorizeColors = [
  Colors.purple,
  Colors.blue,
  Colors.yellow,
  Colors.red,
];

const colorizeTextStyle = TextStyle(
  fontSize: 50.0,
  fontFamily: 'Horizon',
);

return SizedBox(
  width: 250.0,
  child: AnimatedTextKit(
    animatedTexts: [
      ColorizeAnimatedText(
        'Larry Page',
        textStyle: colorizeTextStyle,
        colors: colorizeColors,
      ),
      ColorizeAnimatedText(
        'Bill Gates',
        textStyle: colorizeTextStyle,
        colors: colorizeColors,
      ),
      ColorizeAnimatedText(
        'Steve Jobs',
        textStyle: colorizeTextStyle,
        colors: colorizeColors,
      ),
    ],
    isRepeatingAnimation: true,
    onTap: () {
      print("Tap Event");
    },
  ),
);

Note: colors list should contains at least two values.

TextLiquidFill

return SizedBox(
  width: 250.0,
  child: TextLiquidFill(
    text: 'LIQUIDY',
    waveColor: Colors.blueAccent,
    boxBackgroundColor: Colors.redAccent,
    textStyle: TextStyle(
      fontSize: 80.0,
      fontWeight: FontWeight.bold,
    ),
    boxHeight: 300.0,
  ),
);

To get more information about how the animated text made from scratch by @HemilPanchiwala, visit the Medium blog.

Wavy

return DefaultTextStyle(
  style: const TextStyle(
    fontSize: 20.0,
  ),
  child: AnimatedTextKit(
    animatedTexts: [
      WavyAnimatedText('Hello World'),
      WavyAnimatedText('Look at the waves'),
    ],
    isRepeatingAnimation: true,
    onTap: () {
      print("Tap Event");
    },
  ),
);

Flicker

return SizedBox(
  width: 250.0,
  child: DefaultTextStyle(
    style: const TextStyle(
      fontSize: 35,
      color: Colors.white,
      shadows: [
        Shadow(
          blurRadius: 7.0,
          color: Colors.white,
          offset: Offset(0, 0),
        ),
      ],
    ),
    child: AnimatedTextKit(
      repeatForever: true,
      animatedTexts: [
        FlickerAnimatedText('Flicker Frenzy'),
        FlickerAnimatedText('Night Vibes On'),
        FlickerAnimatedText("C'est La Vie !"),
      ],
      onTap: () {
        print("Tap Event");
      },
    ),
  ),
);

Create your own Animations

You can easily create your own animations by creating new classes that extend AnimatedText, just like most animations in this package. You will need to implement:

  • Class constructor โ€“ Initializes animation parameters.
  • initAnimation โ€“ Initializes Animation instances and binds them to the given AnimationController.
  • animatedBuilder โ€“ Builder method to return a Widget based on Animation values.
  • completeText โ€“ Returns the Widget to display once the animation is complete. (The default implementation returns a styled Text widget.)

Then use AnimatedTextKit to display the custom animated text class like:

AnimatedTextKit(
  animatedTexts: [
    CustomAnimatedText(
      'Insert Text Here',
      textStyle: const TextStyle(
        fontSize: 32.0,
        fontWeight: FontWeight.bold,
      ),
    ),
  ],
),

Bugs or Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.

See Contributing.md.

Contributors

Thanks goes to these wonderful people (emoji key):


Muhammed Salih Guler

๐Ÿ›

Anders Cheow

๐Ÿ› ๐Ÿค”

Rohit Ashiwal

๐Ÿ›

AdamSGit

๐Ÿค” ๐Ÿšง

Hemil Panchiwala

๐Ÿšง ๐Ÿค” ๐Ÿ“– ๐Ÿ’ก

YiMing Han

๐Ÿค”

Aayush Malhotra

๐Ÿšง ๐Ÿค” ๐Ÿ›

Anthony Whitford

๐Ÿค” ๐Ÿšง

Jordy Wong

๐Ÿ›

Darshan Rander

๐Ÿค” ๐Ÿ’ป ๐ŸŽจ

Nsiah Akuoko Jeremiah

๐Ÿ’ป

Aniket Ambore

๐Ÿ“–

Abhay V Ashokan

๐Ÿ’ป

Ritvij Kumar Sharma

๐Ÿ’ป

Koniiro

๐Ÿ“–

Kalgi Sheth

๐Ÿ’ป ๐Ÿ’ก ๐Ÿ“–

Mohit_007

๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind are welcome! See Contributing.md.

animated-text-kit's People

Contributors

aadumkhor avatar aagarwal1012 avatar abhayvashokan avatar adamsgit avatar aliyoge avatar allcontributors[bot] avatar anderscheow avatar aniketambore avatar awhitford avatar coderinthewoods avatar hemilpanchiwala avatar imgbot[bot] avatar imgbotapp avatar koniiro avatar mohitmadhav avatar nakjemmy avatar r1walz avatar ritvij14 avatar siruscodes avatar sxmeer-ahmed avatar yiminghan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

animated-text-kit's Issues

Show last text

I recently upgraded to v2.0.0 and now my text animations behave differently than they used to. Sure, I had to adjust the duration due to the breaking change -- not a big deal. However, the RotateAnimatedTextKit and FadeAnimatedTextKit used to show the last text item when it was done. Now, it rotates or fades away too, leaving a blank area of the screen.

Is there a way to get the old behavior with 2.x?

Bug: calling containsKey on string

Run the example app, enable break on all exceptions.

A bunch of places in the code call:
if (!widget.text[i].containsKey('text')) throw Error();

containsKey is not a function on String. Maybe you meant to use _texts?

Implement AutoSizeText

In some of the use cases, you may want to let the "text" to fit in a single line without truncating. So I would suggest to use auto_size_text to auto scale the text based on the constraint.

Pub spec error while running debug build

@aagarwal1012 Below is the stack trace

Launching lib/main.dart on iPhone X in debug mode...
compiler message: file:///Users/rajeevjaiswal/development/flutter/.pub-cache/hosted/pub.dartlang.org/animated_text_kit-1.1.0/lib/src/colorize.dart:120:33: Error: No named parameter with the name 'foreground'.
compiler message: TextStyle(foreground: Paint()..shader = linearGradient))
compiler message: ^^^^^^^^^^
compiler message: file:///Users/rajeevjaiswal/development/flutter/packages/flutter/lib/src/painting/text_style.dart:222:9: Context: Found this candidate, but the arguments don't match.
compiler message: const TextStyle({
compiler message: ^

This is happening after integrating the 1.1.0 version

Restart the animation when text value changes

I want to restart the animation when text value changes and I don't want to repeat the animation once the animation is completed

Describe the solution you'd like
when text value changes it restart the animation from begin

RotateAnimatedTextKit not centering

Consider the following code:

      Column(children: [
        Image.asset(
          'images/welcome.jpg',
        ),
        Expanded(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                RotateAnimatedTextKit(
                  duration: Duration(seconds: 9),
                  text: ['one', 'two', 'three'],
                  textStyle: animatedTextStyle,
                  isRepeatingAnimation: false,
                ),
              ],
            ),
          ),
        ),
      ]),

The text appears on the left rather than being centered, despite being a child of Center and Expanded.

If I replace the RotateAnimatedTextKit with FadeAnimatedTextKit, then the text is centered as expected.

To center RotateAnimatedTextKit, I need to wrap it in a Row with mainAxisAlignment: MainAxisAlignment.center, but I would expect that to be unnecessary.

Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15 19A602, locale en-US) and Dart 2.5.0.

Maintainer Required

Due to multiple engagements and commitments, I am unable to devote time to solving issues and maintaining the package. Therefore, I strongly require someone who can spend his time to maintaining this repository.
Anyone interested can comment below and please start working on the current issues! In case of any difficultly, I am ready for a quick call to solve ambiguities.

Not being able to update my String values in the UI

The 'text:' inside the function which contains a list of string doesn't update when I changed my list by inheriting values from a different class. I have used set state to rebuild my widget tree, but it still show my first defined List of string values instead of new ones

Multi-line text with TyperAnimatedTextKit causes last word to disappear/flicker

When using TyperAnimatedTextKit with a long paragraph that takes up several lines, then as the last word in a line gets typed, it'll disappear and get moved to the next line below. This results in kind of flicker as the text being typed is moved to the next line. Is there a way to have the control predict which line the next word should be on, so that it types in on the correct line?

RotateAnimatedTextKit Animation and Infinity Repetition Bug

Bugs Description
(1) When using the RotateAnimatedTextKit widget, the rotation animation does not performs as expected. After the 2.0.0 version, the text starts at the top (not at the center) and it is impossible fix this animation problem using some align property. I hope this issue to be fixed once I'd like to use some of the new versions properties such as "pause".

(2) isRepeatingAnimation property is not working. I'd like to repeat the animation infinitively.

Expected behaviours
Fluid animation and isRepeatingAnimation = true working like 1.3.1 version.

Versions
This bugs only happen in ^2.0.0 versions

Error cause Opacity value isn't double when run and build

Opacity value isn't double

To Reproduce
Steps to reproduce the behavior:

  1. Go to Typer.dart
  2. Your value of capacity is not doube

Expected behavior
Flutter need double variable not integer

Screenshots
file:///Users/ict-apps/Documents/Development/flutter/.pub-cache/hosted/pub.dartlang.org/animated_text_kit-1.2.0/lib/src/typer.dart:123:26: Error: The argument type 'dart.core::int' can't be assigned to the parameter type 'dart.core::double'.
Try changing the type of the parameter, or casting the argument to 'dart.core::double'.
opacity: 1,
^
Compiler terminated unexpectedly.

Flutter:

  • 1.0.0

Dart:

  • 2.1

Additional context

ColorizeAnimatedTextKit does not center text correctly

the widget is centered, but the text position is correct only for the longer text string. The other stings start where the longer string starts, so they appear left shifted.

  Column(children: [
     Text("centered"),
    ColorizeAnimatedTextKit(
        text: [
          "short", //left shifted
          "very long text", //centered
          "normal", //left shifted
        ],
        textStyle: TextStyle(
            fontSize: 50.0,
            fontFamily: "Horizon"
        ),
        colors: [
          Colors.purple,
          Colors.blue,
          Colors.yellow,
          Colors.red,
        ],
        textAlign: TextAlign.center,
        alignment: AlignmentDirectional.center,
    ]);

Expected behavior
Each string should be centered

Flutter:
Flutter (Channel stable, v1.9.1+hotfix.4, on Microsoft Windows [Version 6.1.7601], locale it-IT)
Android toolchain - develop for Android devices (Android SDK version 28.03)
sdk: ">=2.2.2 <3.0.0"

Dart:

  • v 2.5.0

when i use TypewriterAnimatedTextKit it is vary fast how to make it slowly

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Functionality similar to AnimatedSwitcher

Is your feature request related to a problem? Please describe.
I was hoping that this package would let me animate between text similar to what AnimatedSwitcher does.

Describe the solution you'd like
It would be amazing if I could provide a string (or a stream of strings) and when that string changes an animation would be triggered to flawlessly transition between the current and previous string.

Describe alternatives you've considered
An AnimatedSwitcher could achieve some of the effects with a custom transitionBuilder & layoutBuilder but this package seems to be more flexible.

Additional context
Would such functionality even fit into the design of this library?

@aagarwal1012 feel free to close this issue if something like that is beyond the scope of what you wanted this library to be.

Have each letter fade in/out in TyperAnimatedTextKit

Thank you for this great library! I'd like to use the TyperAnimatedTextKit but have each letter fade in, instead of just popping into existence. I looked through the docs but this doesn't seem to be possible?

Duration property

I'm getting error when i want to set duration in TypewriterAnimatedTextKit() object.

The named parameter 'duration' isn't defined.
Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'duration'.dart(undefined_named_parameter)

TextLiquidFill not showing

Describe the bug
I was trying using the TextLiquidFill, but it got me error

Expected behavior
It show up like the example

Screenshots
1589985373571

Flutter:

  • version : 1.18.0-11.1.pre
  • channel : beta

Dart:

  • version : 3.10.2

Additional context
packages/flutter/src/rendering/layer.dart.lib.js 636:12 [_addToSceneWithRetainedRendering]
packages/flutter/src/rendering/layer.dart.lib.js 1212:50 addChildrenToScene
packages/flutter/src/rendering/layer.dart.lib.js 1309:12 addToScene
packages/flutter/src/rendering/layer.dart.lib.js 636:12 [_addToSceneWithRetainedRendering]
packages/flutter/src/rendering/layer.dart.lib.js 1212:50 addChildrenToScene
packages/flutter/src/rendering/layer.dart.lib.js 1723:12 addToScene
packages/flutter/src/rendering/layer.dart.lib.js 1024:12 buildScene
packages/flutter/src/rendering/layer.dart.lib.js 4228:32 compositeFrame
packages/flutter/src/rendering/layer.dart.lib.js 4511:25 drawFrame
packages/flutter/src/widgets/widget_span.dart.lib.js 39783:15 drawFrame
packages/flutter/src/rendering/layer.dart.lib.js 4487:12 [_handlePersistentFrameCallback]
packages/flutter/src/scheduler/binding.dart.lib.js 721:9 [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart.lib.js 693:37 handleDrawFrame
packages/flutter/src/scheduler/binding.dart.lib.js 611:14
dart:sdk_internal 22859:11 internalCallback
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Text changes not updated

Please add the following code to the state class in order to reflect any changes to the string list variable.

in _TyperState override didUpdateWidget to cheack if the text changed.

@override
 void didUpdateWidget(TyperAnimatedTextKit oldWidget) {
   if (widget.text != oldWidget.text) {
         _index = -1;
   _texts = List<Map>();
    
    for (int i = 0; i < widget.text.length; i++) {
      try {
        if (!widget.text[i].containsKey('text')) throw new Error();

        _texts.add({
          'text': widget.text[i]['text'],
          'speed': widget.text[i].containsKey('speed')
              ? widget.text[i]['speed']
              : _speed,
          'pause': widget.text[i].containsKey('pause')
              ? widget.text[i]['pause']
              : _pause,
        });
      } catch (e) {
        _texts.add({'text': widget.text[i], 'speed': _speed, 'pause': _pause});
      }
    }
    super.didUpdateWidget(oldWidget);
  }

Prevent creation of so many widgets and animation variables

It's clear that by creating exact number of text widget and animation variable based on the length of text is the fastest way of creating the desire animation. But memory consumption would increase based on the length of text.

So, I would suggest that just use two animations and two text widget to switch between different text, it could drastically reduce the memory consumption and increase in performance.

Restart animations OR delay between repetitions

When using isRepeatingAnimation: false, it would be nice to be able to programmatically restart the animation(s). (I'm thinking maybe a response to a tap.)

I'm not an expert, but perhaps exposing AnimationController would help?

An alternative solution would be to specify an additional Duration that represents the delay between animation repetitions. My animation takes 9 seconds, for example. Imagine I said, delay 60 seconds before repeating.

Need LTMorphingLabel

Is your feature request related to a problem? Please describe.
i need the effect like LTMorphingLabe

Describe the solution you'd like
https://github.com/lexrus/LTMorphingLabel#scale---default

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Use of Center or Padding messes up with ColorizeAnimatedTextKit

Describe the bug
If I try to adjust ColorizeAnimatedTextKit with padding in a 3 words string, the animation does a run in the first row and then, starts again for the full string.

To Reproduce
Steps to reproduce the behavior:

Center( // or Padding
      child: ColorizeAnimatedTextKit(
          text: [
            "My three words",
          ],
          textStyle: GoogleFonts.dosis(
            fontSize: 38,
            fontWeight: FontWeight.w800,
          ),
          colors: [
            Colors.purple,
            Colors.blue,
            Colors.yellow,
            Colors.red,
          ],
          textAlign: TextAlign.center,
          alignment: AlignmentDirectional.topStart 
          ),
    );
  }

duration method is not working

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Flutter:

  • version
  • channel

Dart:

  • version

Additional context
Add any other context about the problem here.

Bug Fixing

when I move back to animated activity. Animated text hides and doesn't appear again until i restart the app.

Feature request: Percentage parameter for TextLiquidFill widget

Is your feature request related to a problem? Please describe.
I wanted to fill up the waves with a parameter for the TextLiquidFill widget, which is not possible.

Describe the solution you'd like
Add a percentage parameter on the TextLiquidFill
(After looking at your source code, i think it would be as simple as to replace
text_liquid_fill.dart:130 percentValue: _loadValue.value,
to
text_liquid_fill.dart:130 percentValue: _percentage ? percentage : _loadValue.value,

Thank you for your work on this package !

onFinished callback don't work after navigation

Describe the bug
I have TypewriterAnimatedTextKit and set onFinished callback for it. I found that during typewriting if we navigate.push to another page onFinished callback doesn't invoke until we back to the previous page.

To Reproduce
Steps to reproduce the behavior:

  1. create TypewriterAnimatedTextKit
  2. set onFinished callback for it.
  3. Go to NextPage

Flutter:

  • 1.12.13+hotfix.8
  • stable

Dart:

  • Dart 2.7.0

[Question] How to keep Centered TypewriterAnimatedTextKit from "jumping"

Because the cursor "blinks" by being added and removed, the text's width visibly "jitters" as it is centred.

Jun-08-2020 16-49-38

Is there a way I can centre the TypewriterAnimatedTextKit without the text-width from "jumping"?

If I change the package's behaviour of "deleting" the underscore, does this package allow customization of the behaviour** of TypewriterAnimatedTextKit? If not, would this package be open to a PR?

** I wonder if instead of the underscore/cursor being deleted, it would be "replaced" by a whitespace character. If I then set my font to monospace, I imagine the width wouldn't "jump"

ability to choose between Repeating or play once (Forward)

missing a feature

I'd like to add a simple option to the animation whether it shall repeat or play once.

also if possible, more control of the animation, like stopping it, resume and delay.

this is my very 1st ticket ever so hope it's clear and following the rules.

totalRepeatCount is set to 3 by default, why?

In fade.dart:

  /// Sets the number of times animation should repeat
  ///
  /// By default it is set to 3
  final int totalRepeatCount;

Why 3? Not 5 or 10?
I were honestly expected it to be infinity

Animate from right to left

Hi,

Would it be possible to have the animated text from right to left ?

I want to use it to show my users it's possible to slide from right to left, and a animation like that could be nice to show that feature. I use it with colorize right now.

Thanks in advance,

text with setState not work

text with setState not work

code like this

setState(() {
  text = ["AWESOME", "OPTIMISTIC", "DIFFERENT"];
});

.....

RotateAnimatedTextKit(
      text: text,
    ),

When text state change

setState(() {
  text = ["A", "B", "C","D","E"];
});

will got error

I/flutter (10175): The following RangeError was thrown building AnimatedBuilder(animation: AnimationController#386c6(โญ
I/flutter (10175): 1.000; paused), dirty, state: _AnimatedState#4fb90):
I/flutter (10175): RangeError (index): Invalid value: Not in range ...

Flutter:

[โœ“] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.13.6 17G6030, locale en-CN)
[โœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[โœ“] iOS toolchain - develop for iOS devices (Xcode 10.1)
[โœ“] Android Studio (version 3.4)
[โœ“] VS Code (version 1.33.1)
[โœ“] Connected device (1 available)

AnimationController.dispose() called more than once

Describe the bug
When using TyperAnimatedTextKit in a widget that will eventually get removed, an error is shown because the animation controller is attempted to be destroyed multiple times.

To Reproduce
In my use case, I have a FutureBuilder that calls a "Loading" widget (Which contains a TyperAnimatedTextKit), and once the data is loaded FutureBuilder removes the loading widget and replaces it with the content widgets.

Expected behavior
It still works, and it doesn't cause a crash but it prints out to the command line each time (as well as logs internally in my logger).

Screenshots

AnimationController#54de2(โญ 1.000; paused; DISPOSED)] [Exception: AnimationController.dispose() called more than once.
A given AnimationController cannot be disposed more than once.
The following AnimationController object was disposed multiple times:
  AnimationController#54de2(โญ 1.000; paused; DISPOSED)] [LogLevel.FATAL] [March 08, 2020 - 06:31:29 PM] [#0      AnimationController.dispose.<anonymous closure> 
package:flutter/โ€ฆ/animation/animation_controller.dart:751
#1      AnimationController.dispose 
package:flutter/โ€ฆ/animation/animation_controller.dart:762
#2      _TyperState._nextAnimation 
package:animated_text_kit/src/typer.dart:190
#3      _rootRun  (dart:async/zone.dart:1122:38)
#4      _CustomZone.run  (dart:async/zone.dart:1023:19)
#5      _CustomZone.runGuarded  (dart:async/zone.dart:925:7)
#6      _CustomZone.bindCallbackGuarded.<anonymous closure>  (dart:async/zone.dart:965:23)
#7      _rootRun  (dart:async/zone.dart:1126:13)
#8      _CustomZone.run  (dart:async/zone.dart:1023:19)
#9      _CustomZone.bindCallback.<anonymous closure>  (dart:async/zone.dart:949:23)
#10     Timer._createTimer.<anonymous closure>  (dart:async-patch/timer_patch.dart:23:15)
#11     _Timer._runTimers  (dart:isolate-patch/timer_impl.dart:384:19)
#12     _Timer._handleMessage  (dart:isolate-patch/timer_impl.dart:418:5)
#13     _RawReceivePortImpl._handleMessage  (dart:isolate-patch/isolate_patch.dart:174:12)
]

Flutter:

  • v1.12.13+hotfix.8
  • Stable

Dart:

  • 2.7.0

Request to add product in Start Flutter

Hello,

I am Maheshwari from team GeekyAnts. On behalf of Start Flutter, we add open source products which we find helpful to the community & also we provide credits to author itself.

Let me know if you are interested showcase your product in our open source website.

Looking forward to hear from you.

Pause at end of each text

When using TyperAnimatedTextKit, the end of the text animation feels a little rushed as the full text is only displayed for a fraction of second before the next text animation starts (unless you set a high duration which isn't really a solution).

It would be helpful to have an additional argument that adds a delay in ms to the end of each text animation, before starting the next text.

I have tried adding zero-width characters to the end of my text to pad out the timing but this shifts the text to the left slightly (when alignment = centre) so it isn't a good long term solution, besides the fact it feels hacky as it is.

Define text displayed delay

Hi, I'm try to use RotateAnimatedTextKit but I don't find any property to define how long the text must be displayed. There are a duration to specify the animation speed and pause to determine when the next text must be showed, but there is no option to specify how long the text locked before the next.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.