// Author: fruit.com.cn import 'package:flutter/material.dart'; import '../../../core/theme/app_colors.dart'; import '../../../core/theme/app_dimens.dart'; class PlayerLoadingOverlay extends StatelessWidget { const PlayerLoadingOverlay({ super.key, required this.opacity, required this.onFadeEnd, }); final double opacity; final VoidCallback onFadeEnd; @override Widget build(BuildContext context) { return IgnorePointer( key: const Key('player-entry-loading-overlay'), child: AnimatedOpacity( opacity: opacity, duration: const Duration(milliseconds: 140), curve: Curves.easeOut, onEnd: onFadeEnd, child: ColoredBox( color: AppColors.mediaBlack, child: Center( child: Container( key: const Key('player-loading-surface'), width: AppDimens.refreshIndicatorSize, height: AppDimens.refreshIndicatorSize, decoration: BoxDecoration( color: AppColors.refreshIndicatorSurface, borderRadius: BorderRadius.circular( AppDimens.refreshIndicatorRadius, ), ), alignment: Alignment.center, child: const SizedBox.square( dimension: AppDimens.refreshSpinnerSize, child: CircularProgressIndicator( key: Key('player-entry-loading'), color: Colors.white, strokeWidth: AppDimens.refreshSpinnerStroke, ), ), ), ), ), ), ); } }