GuidesImage constructor

const GuidesImage({
  1. required String imagePath,
  2. required String caption,
  3. double? spacing,
  4. double? desiredWidthPercent,
  5. double? desiredHeightPercent,
  6. VoidCallback? onTap,
  7. Key? key,
})

Implementation

const GuidesImage({
  required this.imagePath,
  required this.caption,
  this.spacing,
  this.desiredWidthPercent,
  this.desiredHeightPercent,
  this.onTap,
  super.key,
}) : assert(caption.length > 0),
     assert(
       desiredWidthPercent == null ||
           desiredWidthPercent >= 0.0 && desiredWidthPercent <= 1.0,
     ),
     assert(
       desiredHeightPercent == null ||
           desiredHeightPercent >= 0.0 && desiredHeightPercent <= 1.0,
     );