TContainer constructor

const TContainer({
  1. Key? key,
  2. Widget? child,
  3. double? width,
  4. double? height,
  5. EdgeInsets? margin,
  6. EdgeInsets? padding,
  7. BoxBorder? border,
  8. Color? borderColor,
  9. bool showBorder = false,
  10. double? radius,
  11. BorderRadius? borderRadius,
  12. Color? backgroundColor,
  13. BoxShadow? shadow,
  14. bool showShadow = false,
  15. AlignmentGeometry? alignment,
  16. void onTap()?,
  17. bool showRipple = true,
  18. bool circular = false,
})

Create a rounded container with flexible customization options.

Parameters:

  • width: The width of the container.
  • height: The height of the container.
  • borderRadius: The border radius for rounded corners.
  • radius: Optional shorthand for border radius.
  • padding: The internal padding of the container.
  • margin: The external margin around the container.
  • child: The widget to display inside the container.
  • backgroundColor: The background color of the container.
  • border: Optional custom border for the container.
  • borderColor: The color of the border (used if border is not provided).
  • showBorder: Whether to display the border.
  • shadow: Optional custom shadow for the container.
  • showShadow: Whether to display a default shadow.
  • alignment: Align the child widget inside the container.
  • onTap: Callback for tap gestures on the container.
  • showRipple: Whether to show a ripple effect on tap.
  • circle: Whether the container should be circular.

Implementation

const TContainer({
  super.key,
  this.child,
  this.width,
  this.height,
  this.margin,
  this.padding,
  this.border,
  this.borderColor,
  this.showBorder = false,
  this.radius,
  this.borderRadius,
  this.backgroundColor,
  this.shadow,
  this.showShadow = false,
  this.alignment,
  this.onTap,
  this.showRipple = true,
  this.circular = false,
});