NxButton.primary constructor

NxButton.primary({
  1. VoidCallback? onPressed,
  2. double? width,
  3. double? padding,
  4. double? fontSize,
  5. IconData? leftIcon,
  6. IconData? rightIcon,
  7. double? radius,
  8. bool? isLoading = false,
  9. Widget? child,
})

Implementation

factory NxButton.primary({
  VoidCallback? onPressed,
  double? width,
  double? padding,
  double? fontSize,
  IconData? leftIcon,
  IconData? rightIcon,
  double? radius,
  bool? isLoading = false,
  Widget? child,
}) => NxButton(
  onPressed: onPressed,
  width: width,
  padding: padding,
  fontSize: fontSize,
  leftIcon: leftIcon,
  rightIcon: rightIcon,
  defaultButtonColor: NxColor.primary,
  iconColor: Colors.white,
  radius: radius,
  isLoading: isLoading ?? false,
  child: child,
);