Rumahjo-Android-APP/lib/Ui/screens/widgets/custom_inkWell.dart

39 lines
915 B
Dart
Raw Normal View History

2024-09-07 00:58:50 +00:00
import 'package:flutter/material.dart';
class CustomInkWell extends StatelessWidget {
final Color? color;
final Widget child;
final BorderRadius? borderRadius;
final BoxShape? shape;
final void Function() onTap;
const CustomInkWell(
{super.key,
this.color,
required this.child,
required this.onTap,
this.borderRadius,
this.shape});
@override
Widget build(BuildContext context) {
return Center(
child: Container(
clipBehavior: Clip.antiAlias,
// color: color,
decoration: BoxDecoration(
color: color,
borderRadius: borderRadius,
shape: shape ?? BoxShape.rectangle),
child: Material(
clipBehavior: Clip.antiAlias,
color: Colors.transparent,
child: InkWell(
onTap: onTap,
child: child,
),
),
),
);
}
}