animated_flip_card 1.0.2 animated_flip_card: ^1.0.2 copied to clipboard
Flutter package to implement an animated flip card widget that can be used to show and hide information.
import 'package:animated_flip_card/animated_flip_card.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key}) : super(key: key);
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Container(
alignment: Alignment.center,
child: AnimatedFlipCard(
front: Image.asset(
'assets/images/front.png',
width: 250,
fit: BoxFit.contain,
),
back: Image.asset(
'assets/images/back.png',
width: 250,
fit: BoxFit.contain,
)),
);
}
}