animation_page

Last updated:

0 purchases

animation_page Image
animation_page Images
Add to Cart

Description:

animation page

animation_page #
A new Flutter package project.
Installing #
Add this to your package's pubspec.yaml file:
dependencies:
animation_page: ^0.0.1
copied to clipboard
Custom #
@override
buildTransform(Animation animation) {
return Matrix4.translationValues( 50 * (1.0 - animation.value), 50 * (1.0 - animation.value), 0.0);
}
copied to clipboard
Example #

demo code

class DemoPage extends StatefulWidget {
@override
_DemoPageState createState() => _DemoPageState();
}

class _DemoPageState extends State<DemoPage>
with TickerProviderStateMixin, AnimationPageMixin {

@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView(
children: initAnimationList(widgetList, controller),
),
);
}

List<Widget> widgetList = [
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
child: RaisedButton(
onPressed: () {},
color: Colors.blue,
child: Icon(Icons.add, size: 50,),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
color: Colors.red,
child: Image.asset(
'assets/eat_cape_town_sm.jpg',
height: 200,
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
color: Colors.green,
child: Center(
child: Text(
'Hello World',
style: TextStyle(
fontSize: 30
),
),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 200,
color: Colors.pink,
),
),
];
}
copied to clipboard
example 1 #
@override
buildTransform(Animation animation) {
return Matrix4.translationValues( 20 * (1.0 - animation.value), 20 * (1.0 - animation.value), 0.0);
}
copied to clipboard

example 2 #
@override
buildTransform(Animation animation) {
return Matrix4.translationValues( 30 * (1.0 - animation.value), 0, 0.0);
}
copied to clipboard

example 3 #
@override
buildTransform(Animation animation) {
return Matrix4.translationValues( 0, 30 * (1.0 - animation.value), 0.0);
}
copied to clipboard

example 4 #
@override
buildTransform(Animation animation) {
return Matrix4.translationValues( 0, -30 * (1.0 - animation.value), 0.0);
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.