import 'package:citycards_customer/common_packages/custom_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class CustomFilledButton extends StatelessWidget {
  final double? width;
  final String label;
  final bool? showArrow;
  final GestureTapCallback onTap;

  CustomFilledButton({
    super.key,
    this.width = 266,
    required this.onTap,
    required this.label,
    this.showArrow = false,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        height: 42.h,
        width: width,
        decoration: BoxDecoration(
          color: Color(0xFFF95F62),
          borderRadius: BorderRadius.circular(38.r),
        ),
        child: Center(
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              CustomText(
                text: label,
                color: Colors.white,
                size: 16.sp ,
                weight: FontWeight.w500,
              ),

              if(showArrow!)
                SizedBox(width: 8,),
              if(showArrow!)
              Icon(Icons.arrow_forward_ios_rounded,size: 18.sp, color: Colors.white,)
            ],
          ),
        ),
      ),
    );
  }
}
