47 lines
1.1 KiB
Dart
47 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:sk_base_mobile/app_theme.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(
|
|
color: color ?? Colors.transparent,
|
|
child: Ink(
|
|
padding: padding,
|
|
decoration: BoxDecoration(
|
|
border: border,
|
|
gradient: gradient,
|
|
borderRadius: borderRadius,
|
|
),
|
|
child: InkWell(
|
|
borderRadius: borderRadius, onTap: onTap, child: child)),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|