TextAnimate

tpids·2024년 9월 19일

Flutter

목록 보기
24/40
import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:flutter/material.dart';

class ExTextAnimate extends StatelessWidget {
  const ExTextAnimate({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.black,
      body: SafeArea(
          child: 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");
                },
              ),
            ),
          ),
      ),
    );
  }
}

profile
개발자

0개의 댓글