paymentButton function
Implementation
Widget paymentButton(PaymentViewModel model, SmatPayThemeData theme) {
return GestureDetector(
onTap: model.isBusy ? null : () => model.encryptPaymentCard(),
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(vertical: 16),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [theme.accent, theme.accentVariant],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
),
borderRadius: BorderRadius.circular(30),
boxShadow: [
BoxShadow(
color: theme.primary.withAlpha(51),
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
alignment: Alignment.center,
child: model.isBusy
? CircularProgressIndicator(color: theme.onPrimary)
: Text(
'Pay',
style: TextStyle(
color: theme.onPrimary,
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
),
);
}