NZImageButton constructor

const NZImageButton({
  1. Key? key,
  2. required ImageProvider<Object> image,
  3. VoidCallback? onPressed,
  4. Widget? child,
  5. String? label,
  6. double? width,
  7. double height = 180.0,
  8. double borderRadius = 12.0,
  9. bool block = false,
  10. double opacity = 0.8,
  11. Color? color,
  12. Color? foregroundColor,
})

Implementation

const NZImageButton({
  super.key,
  required this.image,
  this.onPressed,
  this.child,
  this.label,
  this.width,
  this.height = 180.0,
  this.borderRadius = 12.0,
  this.block = false,
  this.opacity = 0.8,
  this.color,
  this.foregroundColor,
}) : assert(child != null || label != null, '必须提供 child 或 label');