DNPrimaryButton.fullWidth constructor

DNPrimaryButton.fullWidth({
  1. Key? key,
  2. bool safeArea = false,
  3. Widget? pendingChild,
  4. Widget? disabledChild,
  5. bool enabled = true,
  6. bool isPending = false,
  7. Color? foregroundColor,
  8. Color? backgroundColor,
  9. Color? disabledBackgroundColor,
  10. Color? progressColor,
  11. required void onPressed(),
  12. bool outlined = false,
  13. double height = 48.0,
  14. bool rounded = true,
  15. BorderRadius? borderRadius,
  16. EdgeInsetsGeometry margin = const EdgeInsets.all(0.0),
  17. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16.0),
  18. Widget? icon,
  19. OutlinedBorder? border,
  20. required Widget child,
})

가로 공간을 모두 채우는 기본 버튼을 만든다.

Implementation

factory DNPrimaryButton.fullWidth({
  Key? key,
  bool safeArea = false,
  Widget? pendingChild,
  Widget? disabledChild,
  bool enabled = true,
  bool isPending = false,
  Color? foregroundColor,
  Color? backgroundColor,
  Color? disabledBackgroundColor,
  Color? progressColor,
  required void Function() onPressed,
  bool outlined = false,
  double height = 48.0,
  bool rounded = true,
  BorderRadius? borderRadius,
  EdgeInsetsGeometry margin = const EdgeInsets.all(0.0),
  EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 16.0),
  Widget? icon,
  OutlinedBorder? border,
  required Widget child,
}) {
  return DNPrimaryButton(
    key: key,
    safeArea: safeArea,
    pendingChild: pendingChild,
    disabledChild: disabledChild,
    enabled: enabled,
    isPending: isPending,
    minimumSize: Size(double.infinity, height),
    foregroundColor: foregroundColor,
    backgroundColor: backgroundColor,
    disabledBackgroundColor: disabledBackgroundColor,
    progressColor: progressColor,
    onPressed: onPressed,
    outlined: outlined,
    height: height,
    rounded: rounded,
    borderRadius: borderRadius,
    margin: margin,
    padding: padding,
    icon: icon,
    border: border,
    child: child,
  );
}