Skip to content

Instantly share code, notes, and snippets.

@anoochit
Created September 1, 2022 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoochit/2ee078df5c8be84052d2ac2501825d7f to your computer and use it in GitHub Desktop.
Save anoochit/2ee078df5c8be84052d2ac2501825d7f to your computer and use it in GitHub Desktop.
sample tween animation
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