BoxDecorationDSL extension
BoxDecoration extensions for DSL-style configuration
Methods
-
bg(
Color color) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Set background color -
circular(
) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Apply circle shape -
copyWith(
{Color? color, Border? border, BorderRadiusGeometry? borderRadius, List< BoxShadow> ? boxShadow, Gradient? gradient, BoxShape? shape}) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Internal copyWith for BoxDecoration -
rectangular(
) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Apply rectangle shape (default) -
rounded(
[double radius = 12]) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Add rounded corners (all corners) -
roundedOnly(
{double topLeft = 0, double topRight = 0, double bottomLeft = 0, double bottomRight = 0}) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Apply rounded corners only on specific corners -
roundedSides(
{double top = 0, double right = 0, double bottom = 0, double left = 0}) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Apply rounded corners on specific sides (left/right/top/bottom) -
shadow(
{Color color = Colors.black26, double blurRadius = 10, Offset offset = const Offset(0, 4), double spread = 0}) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Add box shadow -
withBorder(
Color color, double width) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Add border -
withGradient(
Gradient gradient) → BoxDecoration -
Available on BoxDecoration, provided by the BoxDecorationDSL extension
Add gradient