animated_flipper 0.0.3
animated_flipper: ^0.0.3 copied to clipboard
A Flutter Package for Flipping a View with Animation
This Widget is useful for flipping a view in X-direction right and left for flipping behaviour.
Features #
It can flip any type of widget eg. Container, Image
Getting started #
Import Package and give front and back widget which is required.
Usage #
FlipView(frontView: _buildFront(), backView: _buildBack(), ), Where font and back widget is required
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: FlipView(frontView: _buildFront(), backView: _buildBack(), ),
);
}
// you can use duration value also
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: FlipView(frontView: _buildFront(), backView: _buildBack(), duration: 1500,),
);
}
Widget _buildFront() {
return Center(
child: SvgPicture.asset(
"assets/images/front.svg",
height: 100,
width: 100,
));
}
Widget _buildBack() {
return Center(
child: SvgPicture.asset(
"assets/images/back.svg",
height: 100,
width: 100,
));
}
}
Additional information #
You may install package from pub.dev