Rumahjo-Android-APP/lib/Ui/screens/widgets/custom_inkWell.dart
2024-09-07 07:58:50 +07:00

39 lines
915 B
Dart

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,
),
),
),
);
}
}