flippable_box 0.0.1 flippable_box: ^0.0.1 copied to clipboard
A double-sided Container, that can flip over, revealing content on both sides.
flippable_box #
FlippableBox is a double-sided Container, that holds two pieces of content and automatically re-sizes to match its content, whenever it's flipped over.
Getting Started #
First import the package into your class:
import 'package:flippable_box/flippable_box.dart';
Create a FlippableBox with 2 child widgets. Change the isFlipped
property to trigger the internal flip animation.
GestureDetector(
onTap: () => setState(() => _isFlipped = !_isFlipped),
child: FlippableBox(
bgDecoration: BoxDecoration(color: Colors.white),
front: ChildWidget1(),
back: ChildWidget2(),
isFlipped: _isFlipped,
),
)