content: import 'package:expenz/utils/colors.dart';
  import 'package:expenz/utils/constants.dart';
  import 'package:flutter/material.dart';
  
  class IncomeExpenceChip extends StatefulWidget {
    final String title;
    final double amount;
    final Color bgColor;
    final String imageUrl;
    const IncomeExpenceChip({
      super.key,
      required this.title,
      required this.amount,
      required this.bgColor,
      required this.imageUrl,
    });
  
    @override
    State<IncomeExpenceChip> createState() => _IncomeExpenceChipState();
  }
  
  class _IncomeExpenceChipState extends State<IncomeExpenceChip> {
    @override
    Widget build(BuildContext context) {
      return Container(
        width: MediaQuery.of(context).size.width * 0.45,
        decoration: BoxDecoration(
          color: widget.bgColor,
          borderRadius: BorderRadius.circular(20),
        ),
        child: Padding(
          padding: const EdgeInsets.all(kDefalutPadding),
          child: Row(
            children: [
              Container(
                height: MediaQuery.of(context).size.width * 0.15,
                width: MediaQuery.of(context).size.width * 0.15,
                decoration: BoxDecoration(
                  color: kWhite,
                  borderRadius: BorderRadius.circular(20),
                ),
                child: Center(
                  child: Image.asset(
                    widget.imageUrl,
                    width: 70,
                  ),
                ),
              ),
              const SizedBox(
                width: 10,
              ),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    widget.title,
                    style: const TextStyle(
                      fontSize: 17,
                      color: kWhite,
                      fontWeight: FontWeight.w500,
                    ),
                  ),
                  Text(
                    "\$${widget.amount.toStringAsFixed(0)}",
                    style: const TextStyle(
                      fontSize: 20,
                      color: kWhite,
                      fontWeight: FontWeight.bold,
                    ),
                  ),
                ],
              )
            ],
          ),
        ),
      );
    }
  }
  