delegate static method
WidgetBuilder
delegate({
- Color? color,
- BoxBorder? border,
- BorderRadiusGeometry? borderRadius,
- EdgeInsetsGeometry? margin,
Creates a default overlay box with optional border and background color.
Props:
color: Background color inside the overlay bounds.border: Custom border (e.g.Border.all(...)).borderRadius: Rounded corners for the overlay box.margin: Horizontal insets around the overlay box.
Implementation
static WidgetBuilder delegate({
Color? color,
BoxBorder? border,
BorderRadiusGeometry? borderRadius,
EdgeInsetsGeometry? margin,
}) {
return (context) {
return Container(
margin: margin,
decoration: BoxDecoration(
border: border,
borderRadius: borderRadius,
color: color,
),
);
};
}