TFormContainer constructor

const TFormContainer({
  1. Key? key,
  2. double? width,
  3. double? height,
  4. double? radius,
  5. EdgeInsetsGeometry? padding,
  6. EdgeInsetsGeometry? margin,
  7. Color? backgroundColor,
  8. Color? borderColor,
  9. BoxBorder? border,
  10. bool showBorder = false,
  11. bool showShadow = false,
  12. BoxShadow? shadow,
  13. Alignment formAlignment = Alignment.center,
  14. double? widthFactor,
  15. double? maxWidth,
  16. bool isLoading = false,
  17. bool fullWidth = false,
  18. Color? loadingIndicatorColor,
  19. Widget? child,
  20. void onTap()?,
})

Creates a full width form container with flexible customization options.

Parameters:

  • width: The width of the container.
  • height: The height of the container.
  • radius: The border radius for rounded corners.
  • padding: The internal padding of the container.
  • margin: The external margin around the container.
  • backgroundColor: The background color of the container.
  • borderColor: The color of the border.
  • border: Optional custom border for the container.
  • showBorder: Whether to display the border.
  • showShadow: Whether to display a shadow.
  • shadow: Optional custom shadow for the container.
  • formAlignment: Alignment for the container inside its parent.
  • widthFactor: Fractional width relative to the parent.
  • maxWidth: Maximum width for the container.
  • isLoading: Whether to show a loading indicator.
  • loadingIndicatorColor: The color of the loading indicator.
  • child: The widget to display inside the container.
  • onTap: Callback for tap gestures on the container.

Note: Either use widthFactor or maxWidth. If widthFactor is being used then maxWidth will be not be effective.

Implementation

const TFormContainer({
  super.key,
  this.width,
  this.height,
  this.radius,
  this.padding,
  this.margin,
  this.backgroundColor,
  this.borderColor,
  this.border,
  this.showBorder = false,
  this.showShadow = false,
  this.shadow,
  this.formAlignment = Alignment.center,
  this.widthFactor,
  this.maxWidth,
  this.isLoading = false,
  this.fullWidth = false,
  this.loadingIndicatorColor,
  this.child,
  this.onTap,
});