primaryButton method

  1. @override
Widget primaryButton({
  1. required String label,
  2. required VoidCallback? onPressed,
  3. bool loading = false,
})
override

The main "Verify" button.

Implementation

@override
Widget primaryButton({
  required String label,
  required VoidCallback? onPressed,
  bool loading = false,
}) {
  return SizedBox(
    height: buttonHeight,
    width: double.infinity,
    child: DecoratedBox(
      decoration: BoxDecoration(
        color: theme.buttonColor,
        borderRadius: BorderRadius.circular(buttonRadius),
        boxShadow: [
          BoxShadow(
            color: theme.buttonColor.withValues(alpha: 0.35),
            blurRadius: 12,
            offset: const Offset(0, 5),
          ),
        ],
      ),
      child: buttonInk(
        onPressed: loading ? null : onPressed,
        radius: buttonRadius,
        child: buttonLabel(label, loading, theme.buttonTextColor),
      ),
    ),
  );
}