Skip to content

Instantly share code, notes, and snippets.

@rutvik110
Last active October 6, 2021 14:15
Show Gist options
  • Save rutvik110/debcaaab19ceeb51059a4388b5531fd6 to your computer and use it in GitHub Desktop.
Save rutvik110/debcaaab19ceeb51059a4388b5531fd6 to your computer and use it in GitHub Desktop.
MyCustom Implicit Animation
class MyCustomImplicitAnimation extends StatelessWidget {
const MyCustomImplicitAnimation({Key? key}) : super(key: key);
static final dimensionsTween = Tween<double>(begin: 100.0, end: 200.0);
@override
Widget build(BuildContext context) {
return Scaffold(
body: TweenAnimationBuilder<double>(
tween: dimensionsTween,
duration: const Duration(seconds: 1),
builder: (context, value, child) {
return Center(
child: Container(
color: Colors.blue,
height: value,
width: value,
),
);
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment