Created
September 1, 2022 02:54
-
-
Save anoochit/2ee078df5c8be84052d2ac2501825d7f to your computer and use it in GitHub Desktop.
sample tween animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:get/get.dart'; | |
import '../controllers/home_controller.dart'; | |
class HomeView extends GetView<HomeController> { | |
const HomeView({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: const Text('HomeView'), | |
centerTitle: true, | |
), | |
body: Center( | |
child: TweenAnimationBuilder<double>( | |
tween: Tween<double>(begin: 0, end: 190), | |
duration: const Duration(seconds: 60), | |
builder: (BuildContext context, double size, Widget? child) { | |
return Text('${size.toInt()}'); | |
}, | |
child: Text("0"), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment