Writing Text animation in flutter

251 views Asked by At

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

1

There are 1 answers

0
Mahesh Gv On

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,
            ),
          ),
        ),
      ),
    );
  }
}