import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:lottie/lottie.dart';

import '../../../resource/assets.gen.dart';

/// 生成中的加载组件
class CreatingLoadingWidget extends StatelessWidget {
  /// 提示文本组件
  final Widget tipTextWidget;

  const CreatingLoadingWidget({super.key, required this.tipTextWidget});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        // 垂直水平都居中
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          // 图标
          Lottie.asset(
            Assets.anim.animIntimacyAnalyseCreatingReportData,
            repeat: true,
            width: 82.w,
            height: 82.w,
          ),
          SizedBox(height: 3.h),
          // 文字
          tipTextWidget,
        ],
      ),
    );
  }
}
