MyFlipperWidget constructor

const MyFlipperWidget({
  1. Key? key,
  2. required Widget front,
  3. required Widget back,
  4. List<Widget>? widgetList,
  5. double width = 250,
  6. double height = 350,
  7. double borderRadius = 12.0,
  8. Color backgroundColor = Colors.white,
  9. List<BoxShadow>? boxShadow,
  10. Duration flipDuration = const Duration(milliseconds: 800),
  11. FlipType flipType = FlipType.normal,
  12. Duration bounceDelay = const Duration(milliseconds: 500),
  13. ValueChanged<int>? onFlip,
  14. 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.',
      );