buildNextButton method
Builds the next/finish button using custom or default styling.
Implementation
Widget buildNextButton(
BuildContext context,
String label,
VoidCallback onPressed,
) {
final builder = nextButtonBuilder ?? buttonBuilder;
if (builder != null) return builder(context, label, onPressed);
final color = primaryColor ?? Theme.of(context).colorScheme.primary;
return FilledButton(
style: FilledButton.styleFrom(
backgroundColor: color,
foregroundColor: Colors.white,
padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 12),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(cardBorderRadius * 0.6),
),
),
onPressed: onPressed,
child: Text(label),
);
}