import 'package:flutter/material.dart'; import '../../theme.dart'; class QuizNav extends StatelessWidget { final int step; final int total; final VoidCallback onBack; final String? skipLabel; final VoidCallback? onSkip; const QuizNav({ super.key, required this.step, required this.total, required this.onBack, this.skipLabel, this.onSkip, }); @override Widget build(BuildContext context) { return Padding( padding: const EdgeInsets.fromLTRB(16, 12, 16, 0), child: Row( children: [ GestureDetector( onTap: onBack, child: Container( width: 36, height: 36, decoration: BoxDecoration( color: SColors.bgSurface, borderRadius: BorderRadius.circular(10), border: Border.all(color: SColors.borderLight, width: 1.5), ), child: const Icon(Icons.arrow_back_ios_new_rounded, size: 15, color: SColors.textBody), ), ), const Spacer(), Text('$step of $total', style: SText.caption(SColors.textSub).copyWith(fontWeight: FontWeight.w600)), if (onSkip != null) ...[ const SizedBox(width: 16), GestureDetector( onTap: onSkip, child: Text(skipLabel ?? 'Skip', style: SText.caption(SColors.textSub)), ), ], ], ), ); } }