Skip to content

Instantly share code, notes, and snippets.

@flutter-devs
Created June 14, 2019 11:56
Show Gist options
  • Save flutter-devs/e08e375c0684b571ecbfb7bb3dbad622 to your computer and use it in GitHub Desktop.
Save flutter-devs/e08e375c0684b571ecbfb7bb3dbad622 to your computer and use it in GitHub Desktop.
class HomeScreen extends StatefulWidget {
@override
_HomeScreenState createState() => _HomeScreenState();
}
class _HomeScreenState extends State<HomeScreen>
with SingleTickerProviderStateMixin {
AnimationController _animationController;
@override
void initState() {
super.initState();
_animationController = AnimationController(vsync: this, duration: Duration(seconds: 1));
_animationController.addListener((){
setState((){});
});
_animationController.forward();
}
@override
void dispose() {
super.dispose();
_animationController.dispose();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment