// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:flutter/material.dart';
import 'package:qadirneyriz/config/config.dart';
import 'package:qadirneyriz/widgets/ink_warpper.dart';

class IconButtonCustom extends StatelessWidget {
  final IconData icon;
  final void Function() onTap;
  final Color backColor;
  final Color iconColor;
  const IconButtonCustom({
    Key? key,
    required this.icon,
    required this.onTap,
    required this.backColor,
    required this.iconColor,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWrapper(
      borderRadius: 10, // For applying hover with rounded edges
      onTap: onTap,
      child: Container(
        padding: const EdgeInsets.all(10),
        decoration: BoxDecoration(
          color: backColor,
          border: Border.all(color: config.ui.secendGreen.withOpacity(.3)),
          borderRadius: BorderRadius.circular(10),
        ),
        child: Icon(
          icon,
          color: iconColor,
          size: 20,
        ),
      ),
    );
  }
}
