MyFlipperWidget constructor
const
MyFlipperWidget({
- Key? key,
- required Widget front,
- required Widget back,
- List<
Widget> ? widgetList, - double width = 250,
- double height = 350,
- double borderRadius = 12.0,
- Color backgroundColor = Colors.white,
- List<
BoxShadow> ? boxShadow, - Duration flipDuration = const Duration(milliseconds: 800),
- FlipType flipType = FlipType.normal,
- Duration bounceDelay = const Duration(milliseconds: 500),
- ValueChanged<
int> ? onFlip, - ValueChanged<
int> ? onTap,
Implementation
const MyFlipperWidget({
super.key,
required this.front,
required this.back,
this.widgetList,
this.width = 250,
this.height = 350,
this.borderRadius = 12.0,
this.backgroundColor = Colors.white,
this.boxShadow,
this.flipDuration = const Duration(milliseconds: 800),
this.flipType = FlipType.normal,
this.bounceDelay = const Duration(milliseconds: 500),
this.onFlip,
this.onTap,
}) : assert(
flipType == FlipType.loop
? (widgetList != null && widgetList.length > 0)
: true,
'For loop mode, widgetList must be provided and non-empty.',
);