NZButton.secondary constructor

NZButton.secondary({
  1. Key? key,
  2. required VoidCallback? onPressed,
  3. String? label,
  4. Widget? child,
  5. double? width,
  6. double height = 48.0,
  7. double borderRadius = 12.0,
  8. Widget? icon,
  9. double iconGap = 8.0,
  10. bool isLoading = false,
  11. bool block = false,
  12. double? progress,
  13. Color? progressColor,
  14. Color? color,
  15. Color? foregroundColor,
})

快速创建次要按钮 (微信风格:灰色背景,绿色文字)

Implementation

factory NZButton.secondary({
  Key? key,
  required VoidCallback? onPressed,
  String? label,
  Widget? child,
  double? width,
  double height = 48.0,
  double borderRadius = 12.0,
  Widget? icon,
  double iconGap = 8.0,
  bool isLoading = false,
  bool block = false,
  double? progress,
  Color? progressColor,
  Color? color,
  Color? foregroundColor,
}) => NZButton(
  key: key,
  onPressed: onPressed,
  label: label,
  style: NZButtonStyle.secondary,
  width: width,
  height: height,
  borderRadius: borderRadius,
  icon: icon,
  iconGap: iconGap,
  isLoading: isLoading,
  block: block,
  progress: progress,
  progressColor: progressColor,
  color: color,
  foregroundColor: foregroundColor,
  child: child,
);