skip to Main Content

i am new to flutter and i want to know whether writing text animation is possible in flutter or not. i dont want the hand icon or something, just the text should appear like someone is writing it.

i am able to do the typing animation like below code

              Center(
                child: SizedBox(
                  width: context.width(),
                  child: DefaultTextStyle(
                    style: boldTextStyle(size: 26, color: context.primaryColor),
                    child: AnimatedTextKit(
                      animatedTexts: [
                        // TyperAnimatedText(APP_NAME_TAG_LINE),
                        TyperAnimatedText(APP_NAME_TAG_LINE, speed: const Duration(milliseconds: 200)),
                      ],
                      isRepeatingAnimation: false,
                      pause:const Duration(milliseconds: 50),
                    ),
                  ).paddingLeft(20),
                ),
              )

any help would be appreciated

2

Answers


  1. There is a Package Called AnimatedTextKit()
    you can Check it here :
    https://pub.dev/packages/animated_text_kit

    and this video explanation about it
    https://www.youtube.com/watch?v=foQTKCQqVWk

    Login or Signup to reply.
  2. check here

    import 'package:flutter/material.dart';
    import 'package:animated_text_kit/animated_text_kit.dart';
    
    void main() {
      runApp(MyApp());
    }
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: Center(
              child: TypewriterAnimatedTextKit(
                speed: Duration(milliseconds: 100), // Adjust the typing speed as needed
                repeatForever: false, // Set to true if you want to repeat the animation
                text: ["Your text here."],
                textStyle: TextStyle(
                  fontSize: 26,
                  color: Colors.black,
                ),
              ),
            ),
          ),
        );
      }
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search