MadroidContainer constructor

const MadroidContainer({
  1. Key? key,
  2. bool visible = true,
  3. double height = 0.0,
  4. double width = 0.0,
  5. double margin = 0.0,
  6. double? marginTop,
  7. double? marginLeft,
  8. double? marginRight,
  9. double? marginBottom,
  10. double? marginVertical,
  11. double? marginHorizontal,
  12. double padding = 10.0,
  13. double? paddingTop,
  14. double? paddingLeft,
  15. double? paddingRight,
  16. double? paddingBottom,
  17. double? paddingVertical,
  18. double? paddingHorizontal,
  19. double border = 10.0,
  20. double? borderTop,
  21. double? borderLeft,
  22. double? borderRight,
  23. double? borderBottom,
  24. double? borderVertical,
  25. double? borderHorizontal,
  26. double radius = 0.0,
  27. double? radiusTop,
  28. double? radiusLeft,
  29. double? radiusRight,
  30. double? radiusBottom,
  31. double? radiusDiagonal,
  32. double? radiusInverseDiagonal,
  33. double? radiusTopLeft,
  34. double? radiusTopRight,
  35. double? radiusBottomLeft,
  36. double? radiusBottomRight,
  37. Color? color = kTransparent,
  38. Color borderColor = kTransparent,
  39. String image = '',
  40. ImageType imageType = ImageType.none,
  41. BoxFit imageFit = BoxFit.cover,
  42. double elevation = 0.0,
  43. GradientType gradientType = GradientType.none,
  44. List<Color> gradient = const <Color>[],
  45. BoxShape shape = BoxShape.rectangle,
  46. VoidCallback? onTap,
  47. VoidCallback? onLongPress,
  48. VoidCallback? onDoubleTap,
  49. 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"',
      );