Last active
March 23, 2025 14:59
-
-
Save chooyan-eng/6b825290eb85c5a01f8ec85d460c65fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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'; | |
| void main() { | |
| runApp(const MaterialApp(home: AnimationPage())); | |
| } | |
| class AnimationPage extends StatefulWidget { | |
| const AnimationPage({super.key}); | |
| @override | |
| State<AnimationPage> createState() => _AnimationPageState(); | |
| } | |
| class _AnimationPageState extends State<AnimationPage> | |
| with TickerProviderStateMixin { | |
| late final AnimationController controller; | |
| @override | |
| void initState() { | |
| super.initState(); | |
| controller = AnimationController( | |
| vsync: this, | |
| duration: Duration(seconds: 1), | |
| )..addListener(() { | |
| // just print the current value | |
| debugPrint(controller.value.toString()); | |
| }); | |
| controller.forward(); | |
| } | |
| @override | |
| Widget build(BuildContext context) { | |
| return Scaffold(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment