This commit is contained in:
@@ -5,19 +5,25 @@ import 'package:trainhub_flutter/core/constants/ui_constants.dart';
|
||||
class SessionControls extends StatelessWidget {
|
||||
final bool isRunning;
|
||||
final bool isFinished;
|
||||
final bool isTimeBased;
|
||||
final VoidCallback onPause;
|
||||
final VoidCallback onPlay;
|
||||
final VoidCallback onNext;
|
||||
final VoidCallback onPrevious;
|
||||
final VoidCallback onRewind;
|
||||
final VoidCallback onFastForward;
|
||||
|
||||
const SessionControls({
|
||||
super.key,
|
||||
required this.isRunning,
|
||||
required this.isFinished,
|
||||
required this.isTimeBased,
|
||||
required this.onPause,
|
||||
required this.onPlay,
|
||||
required this.onNext,
|
||||
required this.onPrevious,
|
||||
required this.onRewind,
|
||||
required this.onFastForward,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -39,13 +45,20 @@ class SessionControls extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (isTimeBased) ...[
|
||||
_ControlButton(
|
||||
icon: Icons.replay_10,
|
||||
onTap: onRewind,
|
||||
size: 24,
|
||||
),
|
||||
const SizedBox(width: UIConstants.spacing8),
|
||||
],
|
||||
_ControlButton(
|
||||
icon: Icons.skip_previous_rounded,
|
||||
onTap: onPrevious,
|
||||
size: 28,
|
||||
),
|
||||
const SizedBox(width: UIConstants.spacing24),
|
||||
// Play/Pause - larger main button
|
||||
Container(
|
||||
width: 56,
|
||||
height: 56,
|
||||
@@ -79,6 +92,14 @@ class SessionControls extends StatelessWidget {
|
||||
onTap: onNext,
|
||||
size: 28,
|
||||
),
|
||||
if (isTimeBased) ...[
|
||||
const SizedBox(width: UIConstants.spacing8),
|
||||
_ControlButton(
|
||||
icon: Icons.forward_10,
|
||||
onTap: onFastForward,
|
||||
size: 24,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user