customflipcard 0.0.9 customflipcard: ^0.0.9 copied to clipboard
A new custom flip card is a widget, that can be fliped/rotated to right on tap and vice-versa.This widget is still is in beta version.
// Flutter code sample for Card
// This sample shows creation of a [Card] widget that shows album information
// and two actions.
import 'package:flutter/material.dart';
import 'package:customflipcard/customflipcard.dart';
void main() => runApp(MyApp());
/// This Widget is the main application widget.
class MyApp extends StatelessWidget {
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
return MaterialApp(
title: _title,
home: Scaffold(
appBar: AppBar(title: const Text(_title)),
body: MyStatelessWidget(),
),
);
}
}
/// This is the stateless widget that the main application instantiates.
class MyStatelessWidget extends StatelessWidget {
MyStatelessWidget({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
CustomFlipCardWidget(
containerHeight: 200,
containerWidth: 200,
backView: Container(
color: Colors.yellow[200],
child: Center(
child: Text(
"Font side.",
),
),
),
frontView: Container(
color: Colors.yellow[200],
child: Center(
child: Text(
"Font side.",
),
),
),
containerDecoration: BoxDecoration(border: Border.all(color: Colors.blueAccent)),
),
],
),
),
);
}
}