Files
smooth-app/packages/smooth_app/lib/widgets/smooth_cliprrect.dart
Edouard Marquez 019e319384 feat: New UI for history/search lists (#6161)
* Change the UI of history/search list items

* Update goldens
2025-01-09 16:08:37 +01:00

33 lines
679 B
Dart

import 'package:flutter/material.dart';
class SmoothClipRRect extends StatelessWidget {
const SmoothClipRRect({
required this.child,
this.enabled = true,
this.borderRadius = BorderRadius.zero,
this.clipBehavior = Clip.antiAlias,
this.clipper,
super.key,
});
final Widget child;
final bool enabled;
final BorderRadius borderRadius;
final Clip clipBehavior;
final CustomClipper<RRect>? clipper;
@override
Widget build(BuildContext context) {
if (!enabled) {
return child;
}
return ClipRRect(
borderRadius: borderRadius,
clipBehavior: clipBehavior,
clipper: clipper,
child: child,
);
}
}