// Author: fruit.com.cn import 'package:flutter/material.dart'; import '../../../core/theme/app_colors.dart'; /// Shared play/pause control used by the home feed and full-screen player. class PlayerCenterToggle extends StatelessWidget { const PlayerCenterToggle({ super.key, required this.playing, required this.onTap, }); final bool playing; final VoidCallback onTap; @override Widget build(BuildContext context) { return Semantics( button: true, label: playing ? 'Pause' : 'Play', child: GestureDetector( onTap: onTap, child: Container( width: 52, height: 52, decoration: const BoxDecoration( color: Color(0x80000000), shape: BoxShape.circle, ), child: Icon( playing ? Icons.pause_rounded : Icons.play_arrow_rounded, color: AppColors.onPrimary, size: 26, ), ), ), ); } }