Button constructor

Button({
  1. Key? key,
  2. required String label,
  3. dynamic onClick(
    1. dynamic
    )?,
  4. LiWETheme mode = LiWETheme.info,
  5. double? borderRadius,
  6. double? border,
  7. Color? borderColor,
  8. Color? backgroundColor,
  9. Color? color,
  10. double? fontSize,
})

Implementation

Button({
  super.key,
  required this.label,
  this.onClick,
  this.mode = LiWETheme.info,
  double? borderRadius,
  double? border,
  Color? borderColor,
  Color? backgroundColor,
  Color? color,
  this.fontSize,
}) {
  Map<String, Color?> cols = theme.getVariant(mode);

  this.backgroundColor = backgroundColor ?? cols["backgroundColor"];
  this.color = color ?? cols["color"];
  this.borderRadius = borderRadius ?? theme.borderRadius.value;
  this.border = 1.0;
  this.borderColor = borderColor ?? cols["borderColor"];
}