callToAction static method

FlintButton callToAction({
  1. required String text,
  2. required String url,
  3. ButtonSize size = ButtonSize.large,
  4. bool prominent = true,
  5. String? icon,
})

Create a prominent call-to-action button

Implementation

static FlintButton callToAction({
  required String text,
  required String url,
  ButtonSize size = ButtonSize.large,
  bool prominent = true,
  String? icon,
}) {
  return FlintButton(
    text: text,
    url: url,
    style: ButtonStyle.primary().copyWith(
      backgroundColor: prominent ? '#007cba' : '#6c757d',
      textStyle: TextStyle(
        color: '#ffffff',
        fontWeight: FontWeight.w700,
        fontSize: _getFontSizeForButtonSize(size),
      ),
    ),
    padding: _getPaddingForSize(size),
    borderRadius: BorderRadius.circular(8.0),
    shadow: prominent
        ? BoxShadow(
            offsetY: 4, blurRadius: 12, color: 'rgba(0, 124, 186, 0.3)')
        : BoxShadow(offsetY: 2, blurRadius: 6, color: 'rgba(0, 0, 0, 0.1)'),
    fullWidth: size == ButtonSize.xlarge,
    size: size,
    icon: icon,
  );
}