import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

/// 录制加载遮罩（相机启动/开始录制）
class RecordingLoadingOverlayWidget extends StatelessWidget {
  const RecordingLoadingOverlayWidget({
    super.key,
    required this.message,
    this.backgroundColor = Colors.black,
  });

  final String message;
  final Color backgroundColor;

  @override
  /// 显示加载动画与提示文案
  Widget build(BuildContext context) {
    return ColoredBox(
      color: backgroundColor,
      child: Center(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            SizedBox.square(
              dimension: 32.r,
              child: CircularProgressIndicator(
                strokeWidth: 2.5.r,
                color: Colors.white70,
              ),
            ),
            SizedBox(height: 14.h),
            Text(
              message,
              style: TextStyle(color: Colors.white70, fontSize: 14.sp),
            ),
          ],
        ),
      ),
    );
  }
}
