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