Flutter Tween Animation Example | Flutter Animation



Flutter Animation Create using Flutter Tween Animation builder. Let’s started –

TweenAnimationBuilder(
                      tween: IntTween(begin: 0, end: 100),
                      duration: Duration(seconds: 5),
                      builder: (context, int value, child) => Text(
                            "$value" + "+",
                            style: TextStyle(
                                color: Colors.white,
                                fontSize: 100,
                                fontWeight: FontWeight.w900),
                          )),

Tween Animation Builder

Tween Animation

source code:

import 'package:flutter/material.dart';

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

class MyApp extends StatefulWidget {
  MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
          backgroundColor: Color.fromARGB(255, 18, 9, 33),
          body: Center(
            child: Column(
                crossAxisAlignment: CrossAxisAlignment.center,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  TweenAnimationBuilder(
                      tween: IntTween(begin: 0, end: 100),
                      duration: Duration(seconds: 5),
                      builder: (context, int value, child) => Text(
                            "$value" + "+",
                            style: TextStyle(
                                color: Colors.white,
                                fontSize: 100,
                                fontWeight: FontWeight.w900),
                          )),
                ]),
          )),
    );
  }
}
  • How to Add a Link to Your Facebook Story in 2024
    Facebook Stories have become an integral part of our social media experience, allowing us to share moments and updates with our friends and followers. But did you know that you can also add links to your Facebook Stories? Adding a link to your story can be a powerful way to drive traffic to your website, …

    Read more …

  • Troubleshooting “Failed to download Laravel from dist” Error
    If you encounter the “Failed to download Laravel from dist” error while working with Laravel 10, it is likely due to the absence of the zip extension and unzip/7z commands on your system. This error prevents the successful download of Laravel from the distribution (dist) repository. What causes this error? The error occurs when the …

    Read more …

  • Solutions for “The file is too large for the destination file system” Error on Pendrive
    If you have ever encountered the frustrating error message “The file is too large for the destination file system” when trying to transfer files to your pendrive, don’t worry! There are a few solutions you can try to resolve this issue. 1. Format the Pendrive: One of the easiest ways to fix this error is …

    Read more …

  • Which Business Administration Degree is Best? Career Success
    Are you ready to take your career to the next level? A business administration degree could be your ticket to success. But with so many options out there, how do you choose the perfect program? Look no further – we’re here to help you unveil the best program for your career success. Whether you’re a …

    Read more …

  • The Importance of Fast WordPress Hosting for Your Website
    As the online world continues to evolve, having a fast and reliable website is crucial for businesses and individuals alike. Slow loading times can lead to frustrated visitors, high bounce rates, and ultimately, a loss in potential customers. This is where fast WordPress hosting comes into play. WordPress is one of the most popular content …

    Read more …

Leave a Comment