MadroidContainer constructor
const
MadroidContainer({
- Key? key,
- bool visible = true,
- double height = 0.0,
- double width = 0.0,
- double margin = 0.0,
- double? marginTop,
- double? marginLeft,
- double? marginRight,
- double? marginBottom,
- double? marginVertical,
- double? marginHorizontal,
- double padding = 10.0,
- double? paddingTop,
- double? paddingLeft,
- double? paddingRight,
- double? paddingBottom,
- double? paddingVertical,
- double? paddingHorizontal,
- double border = 10.0,
- double? borderTop,
- double? borderLeft,
- double? borderRight,
- double? borderBottom,
- double? borderVertical,
- double? borderHorizontal,
- double radius = 0.0,
- double? radiusTop,
- double? radiusLeft,
- double? radiusRight,
- double? radiusBottom,
- double? radiusDiagonal,
- double? radiusInverseDiagonal,
- double? radiusTopLeft,
- double? radiusTopRight,
- double? radiusBottomLeft,
- double? radiusBottomRight,
- Color? color = kTransparent,
- Color borderColor = kTransparent,
- String image = '',
- ImageType imageType = ImageType.none,
- BoxFit imageFit = BoxFit.cover,
- double elevation = 0.0,
- GradientType gradientType = GradientType.none,
- List<
Color> gradient = const <Color>[], - BoxShape shape = BoxShape.rectangle,
- VoidCallback? onTap,
- VoidCallback? onLongPress,
- VoidCallback? onDoubleTap,
- Widget? child,
Implementation
const MadroidContainer({
super.key,
this.visible = true,
this.height = 0.0,
this.width = 0.0,
this.margin = 0.0,
this.marginTop,
this.marginLeft,
this.marginRight,
this.marginBottom,
this.marginVertical,
this.marginHorizontal,
this.padding = 10.0,
this.paddingTop,
this.paddingLeft,
this.paddingRight,
this.paddingBottom,
this.paddingVertical,
this.paddingHorizontal,
this.border = 10.0,
this.borderTop,
this.borderLeft,
this.borderRight,
this.borderBottom,
this.borderVertical,
this.borderHorizontal,
this.radius = 0.0,
this.radiusTop,
this.radiusLeft,
this.radiusRight,
this.radiusBottom,
this.radiusDiagonal,
this.radiusInverseDiagonal,
this.radiusTopLeft,
this.radiusTopRight,
this.radiusBottomLeft,
this.radiusBottomRight,
this.color = kTransparent,
this.borderColor = kTransparent,
this.image = '',
this.imageType = ImageType.none,
this.imageFit = BoxFit.cover,
this.elevation = 0.0,
this.gradientType = GradientType.none,
this.gradient = const <Color>[],
this.shape = BoxShape.rectangle,
this.onTap,
this.onLongPress,
this.onDoubleTap,
this.child,
}) : assert(
radiusTop == null || radiusLeft == null,
'Cannot provide both a radiusTop and a radiusLeft\n'
'Try using the combination of "radiusTopLeft: radius" , "radiusTopRight: radius" and "radiusBottomLeft: radius".',
),
assert(
radiusBottom == null || radiusLeft == null,
'Cannot provide both a radiusBottom and a radiusLeft\n'
'Try using the combination of "radiusBottomLeft: radius" , "radiusBottomRight: radius" and "radiusTopLeft: radius".',
),
assert(
radiusTop == null || radiusRight == null,
'Cannot provide both a radiusTop and a radiusRadius\n'
'Try using the combination of "radiusTopRight: radius" , "radiusTopLeft: radius" and "radiusBottomRight: radius".',
),
assert(
radiusBottom == null || radiusRight == null,
'Cannot provide both a radiusBottom and a radiusRight\n'
'Try using the combination of "radiusBottomRight: radius" , "radiusBottomLeft: radius" and "radiusTopRight: radius".',
),
assert(
radiusTop == null || radiusDiagonal == null,
'Cannot provide both a radiusTop and a radiusDiagonal\n'
'Try using the combination of "radiusTopLeft: radius" , "radiusTopRight: radius" and "radiusBottomLeft: radius".',
),
assert(
radiusTop == null || radiusInverseDiagonal == null,
'Cannot provide both a radiusTop and a radiusInverseDiagonal\n'
'Try using the combination of "radiusTopLeft: radius" , "radiusTopRight: radius" and "radiusBottomRight: radius".',
),
assert(
radiusLeft == null || radiusDiagonal == null,
'Cannot provide both a radiusLeft and a radiusDiagonal\n'
'Try using the combination of "radiusTopLeft: radius" , "radiusBottomLeft: radius" and "radiusTopRight: radius".',
),
assert(
radiusLeft == null || radiusInverseDiagonal == null,
'Cannot provide both a radiusLeft and a radiusInverseDiagonal\n'
'Try using the combination of "radiusTopLeft: radius" , "radiusBottomLeft: radius" and "radiusBottomRight: radius".',
),
assert(
radiusRight == null || radiusDiagonal == null,
'Cannot provide both a radiusRight and a radiusDiagonal\n'
'Try using the combination of "radiusTopRight: radius" , "radiusBottomRight: radius" and "radiusBottomLeft: radius".',
),
assert(
radiusRight == null || radiusInverseDiagonal == null,
'Cannot provide both a radiusRight and a radiusInverseDiagonal\n'
'Try using the combination of "radiusTopRight: radius" , "radiusBottomRight: radius" and "radiusTopLeft: radius".',
),
assert(
radiusBottom == null || radiusDiagonal == null,
'Cannot provide both a radiusBottom and a radiusDiagonal\n'
'Try using the combination of "radiusBottomLeft: radius" , "radiusBottomRight: radius" and "radiusTopRight: radius".',
),
assert(
radiusBottom == null || radiusInverseDiagonal == null,
'Cannot provide both a radiusBottom and a radiusInverseDiagonal\n'
'Try using the combination of "radiusBottomLeft: radius" , "radiusBottomRight: radius" and "radiusTopLeft: radius".',
),
assert(
gradientType == GradientType.none && gradient == const <Color>[],
'Must provide both "gradient" and "gradientType"',
),
assert(
imageType == ImageType.none && image == '',
'Must provide both "image" and "imageType"',
);