animated_text 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 72

I can code faster but my laptop is lazy. Help me upgrade it. Please consider donating if you think Animated_Text is helpful.

Paypal Me on paypal.me/kawal7415

Platform Pub Package License: MIT Donate Issue Forks Stars

Animated_Text #

Animated_Text helps you to animate between words by re-using the similar alphabets in them.

Installing #

1. Depend on it #

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

dependencies:
  animated_text: ^1.0.1

2. Install it #

You can install packages from the command line:

with pub:

$  pub get

with Flutter:

$  flutter packages get

3. Import it #

Now in your Dart code, you can use:

    import 'package:animated_text/animated_text.dart';
    

Usage #

AnimatedText #

      /** Your parent widget here */
      
      child : AnimatedText(
        alignment: Alignment.center,
        speed: Duration(milliseconds: 2000),
        controller: AnimatedTextController.loop,
        displayTime: Duration(milliseconds: 2000),
        wordList: ['TESLA', 'APPLE', 'GOOGLE', 'AMAZON'],
        repeatCount: 10,
        textStyle: TextStyle(color: Colors.black, fontSize: 55, fontWeight: FontWeight.w700),
        onAnimate: (index) {
                  print("Animating index:" + index.toString());
                },
        onFinished: () {
                  print("Animtion finished");
                },
        ),
      

Animated_Text

Widget Options #

keydescription
controllercontrols the animation state enum AnimatedTextController { play, pause, stop, restart, loop } by-default it is set to AnimatedTextController.play
onAnimatecalled whenever the next animation is going to start
onFinishedcalled when the animation is finished and is not a looping animation
repeatCountit tells how many times the animation should be repeated by default it is set to repeatCount = 5
textStyleUses the DefaultTextStyle of the context if not used.
displayTimetells for how much time the animation should wait and display the text before starting the next animation.

Features coming in next version #

On-going implementation for future:

  • Custom Fade Animation Selection

Help us to keep going. #

Donate with PayPal

Donate

Changelog #

All notable changes to this project will be documented in this file.

[Future Updates coming soon] #

  • Multi Lines
  • Custom fade type selection

[1.0.1] - 2020-05-22 #

Changes #

  • README changes

[1.0.0] - 2020-05-22 #

Released #

  • AnimatedText launched

example/lib/main.dart

import 'package:animated_text/animated_text.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  bool play = true;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Text Animations'),
      ),
      body: Container(
        color: Colors.yellow,
        child: Column(
          children: <Widget>[
            Container(
              width: MediaQuery.of(context).size.width,
              decoration: BoxDecoration(
                image: DecorationImage(
                    image: AssetImage('assets/three.jpg'), fit: BoxFit.fill),
              ),
              height: 300,
              child: new AnimatedText(
                alignment: Alignment.center,
                speed: Duration(milliseconds: 1000),
                controller: AnimatedTextController.loop,
                displayTime: Duration(milliseconds: 2000),
                wordList: ['flutter', 'future'],
                repeatCount: 10,
                textStyle: TextStyle(
                    color: Colors.white,
                    fontSize: 55,
                    fontWeight: FontWeight.w700),
                onAnimate: (index) {
                  print("index:" + index.toString());
                },
                onFinished: () {
                  print("Animtion finished");
                },
              ),
            ),
          ],
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  animated_text: ^1.0.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:animated_text/animated_text.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
44
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
72
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [animated_text] that is in a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies
flutter_test