NZProgressButton constructor

const NZProgressButton({
  1. Key? key,
  2. required double progress,
  3. required VoidCallback? onPressed,
  4. Widget? child,
  5. String? label,
  6. Color? color,
  7. Color? backgroundColor,
  8. Color? foregroundColor,
  9. double? width,
  10. double height = 48.0,
  11. double borderRadius = 12.0,
  12. bool block = false,
})

Implementation

const NZProgressButton({
  super.key,
  required this.progress,
  required this.onPressed,
  this.child,
  this.label,
  this.color,
  this.backgroundColor,
  this.foregroundColor,
  this.width,
  this.height = 48.0,
  this.borderRadius = 12.0,
  this.block = false,
}) : assert(child != null || label != null, '必须提供 child 或 label');