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

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

/// 步骤标签组件
class StepLabelWidget extends StatelessWidget {
  /// 文字
  final String label;

  const StepLabelWidget({super.key, required this.label});

  @override
  Widget build(BuildContext context) {
    return Container(
      // 不规则的圆角背景
      decoration: BoxDecoration(
        color: ColorName.bgStep,
        borderRadius: BorderRadius.only(
          topLeft: Radius.circular(6.r),
          topRight: Radius.circular(10.r),
          bottomLeft: Radius.circular(17.r),
          bottomRight: Radius.circular(6.r),
        ),
      ),
      padding: EdgeInsets.symmetric(horizontal: 7.w, vertical: 5.w),
      // 文字
      child: Text(label, style: TextStyle(color: ColorName.white)),
    );
  }
}
