GFCard constructor

const GFCard({
  1. Key? key,
  2. Color? color,
  3. double? elevation,
  4. ShapeBorder? shape,
  5. bool borderOnForeground = true,
  6. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  7. EdgeInsetsGeometry? margin,
  8. Clip? clipBehavior,
  9. bool? semanticContainer,
  10. GFListTile? title,
  11. Widget? content,
  12. Image? image,
  13. bool showImage = false,
  14. bool showOverlayImage = false,
  15. GFButtonBar? buttonBar,
  16. ImageProvider<Object>? imageOverlay,
  17. GFPosition? titlePosition,
  18. BorderRadiusGeometry? borderRadius,
  19. Border? border,
  20. BoxFit? boxFit,
  21. ColorFilter? colorFilter,
  22. double? height,
  23. LinearGradient? gradient,
})

Creates a material design card.

The elevation must be null or non-negative. The borderOnForeground must not be null.

Implementation

const GFCard({
  Key? key,
  this.color,
  this.elevation,
  this.shape,
  this.borderOnForeground = true,
  this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  this.margin,
  this.clipBehavior,
  this.semanticContainer,
  this.title,
  this.content,
  this.image,
  this.showImage = false,
  this.showOverlayImage = false,
  this.buttonBar,
  this.imageOverlay,
  this.titlePosition,
  this.borderRadius,
  this.border,
  this.boxFit,
  this.colorFilter,
  this.height,
  this.gradient,
})  : assert(elevation == null || elevation >= 0.0),
      assert(
        color == null || gradient == null,
        'Cannot provide both a color and a decoration\n'
        'The color argument is just a shorthand for "decoration: new BoxDecoration(color: color)".',
      ),
      super(key: key);