TFormContainer constructor
const
TFormContainer({
- Key? key,
- double? width,
- double? height,
- double? radius,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- Color? backgroundColor,
- Color? borderColor,
- BoxBorder? border,
- bool showBorder = false,
- bool showShadow = false,
- BoxShadow? shadow,
- Alignment formAlignment = Alignment.center,
- double? widthFactor,
- double? maxWidth,
- bool isLoading = false,
- bool fullWidth = false,
- Color? loadingIndicatorColor,
- Widget? child,
- 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,
});