callToAction static method
FlintButton
callToAction({
- required String text,
- required String url,
- ButtonSize size = ButtonSize.large,
- bool prominent = true,
- 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,
);
}