Flip Card in Flutter || Amazevalley

Flip Card is a component that provides you flip animation on the card it's used to hide and show the details of the card or you can say that displaying multi info at same place.



Explore at Flip Card




import 'package:flutter/material.dart';
import 'package:flip_card/flip_card.dart';
void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: MyHomePage(), debugShowCheckedModeBanner: false, );
} }

class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState(); }
class _MyHomePageState extends State {
@override Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar( title: Text('Flip Card In Flutter Demo'), ),
body: ListView(
children: [ Container(
width: MediaQuery.of(context).size.width, height: 200.0, child: FlipCard(
direction: FlipDirection.VERTICAL, // you can choose whatever you want front: Container(
height: 200.0, color: Colors.purple[500], child: Column(
children: [ SizedBox(height: 20.0,), Text('FRONT',style: TextStyle(
fontSize: 30.0, color: Colors.white, fontWeight: FontWeight.bold
),),
SizedBox(height: 20.0,),
Text('This is front side of the card.',style: TextStyle(
fontSize: 20.0, color: Colors.white,
),), ], ), ), back: Container(
height: 200.0, color: Colors.black, child: Column( children: [
SizedBox(height: 20.0,), Text('BACK',style: TextStyle(
fontSize: 30.0, color: Colors.white, fontWeight: FontWeight.bold ),),
SizedBox(height: 20.0,), Text('This is the back side of the card.',style: TextStyle(
fontSize: 20.0, color: Colors.white, ),),
], ), ), ) ), ], ) );
} }



I hope this article give you good information about how to use the flip card in flutter. If you have any query do comment below thanks, Flutter Developers

Comments

Popular posts from this blog

Multi Image Picker In Flutter || Amazevalley

Listview sort by name in Flutter || Amazevalley

Image Picker In Flutter || Amazevalley