import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:taafee_mobile/common/extensions/widget_extension.dart';
import 'package:taafee_mobile/common/widgets/text.dart';

class ImageWidget extends StatelessWidget {
  final int numberOfImages;
  const ImageWidget({
    super.key,
    required this.numberOfImages,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: const EdgeInsets.symmetric(horizontal: 5),
      width: Get.width * .2,
      height: Get.width * .2,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.circular(10),
        image: const DecorationImage(
          image: AssetImage("assets/images/download.jpg"),
          fit: BoxFit.cover,
        ),
      ),
      child: numberOfImages > 4
          ? BoldTextWidget(
              "+$numberOfImages",
              fontSize: 24,
              color: Colors.white,
            ).center()
          : Container(),
    );
  }
}
