import 'package:flutter/material.dart';
import 'package:sk_base_mobile/app_theme.dart';
import 'package:sk_base_mobile/constants/bg_color.dart';
import 'package:sk_base_mobile/util/screen_adaper_util.dart';

class SkInk extends StatelessWidget {
  final Widget? child;
  final void Function()? onTap;
  final BorderRadius? borderRadius;
  final BoxBorder? border;

  final Color? color;
  final EdgeInsets? padding;
  final EdgeInsets? margin;
  final Gradient? gradient;
  const SkInk(
      {super.key,
      this.child,
      this.onTap,
      this.color,
      this.borderRadius,
      this.border,
      this.gradient,
      this.margin,
      this.padding});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: margin,
      child: ClipRRect(
        borderRadius: borderRadius ?? BorderRadius.zero,
        child: Material(
          child: Ink(
              padding: padding,
              decoration: BoxDecoration(
                border: border,
                color: color,
                gradient: gradient,
                borderRadius: borderRadius,
              ),
              child: InkWell(
                  borderRadius: borderRadius, onTap: onTap, child: child)),
        ),
      ),
    );
  }
}
