Card constructor

const Card({
  1. Widget? child,
  2. List<Widget>? children,
  3. CardVariant variant = CardVariant.elevated,
  4. EdgeInsets? padding,
  5. BorderRadius? borderRadius,
  6. void onTap()?,
  7. String? href,
  8. String? target,
  9. String? rel,
  10. String? classes,
  11. Map<String, String>? attributes,
  12. String? ariaLabel,
  13. String? backgroundColor,
  14. bool fillWidth = false,
  15. ArcaneStyleData? styles,
  16. ArcaneDecoration? decoration,
  17. Key? key,
})

Implementation

const Card({
  Widget? child,
  List<Widget>? children,
  this.variant = CardVariant.elevated,
  this.padding,
  this.borderRadius,
  void Function()? onTap,
  this.href,
  this.target,
  this.rel,
  this.classes,
  this.attributes,
  this.ariaLabel,
  this.backgroundColor,
  this.fillWidth = false,
  this.styles,
  this.decoration,
  super.key,
}) : _child = child,
     _children = children,
     _onTap = onTap,
     assert(
       child != null || children != null,
       'Either child or children must be provided',
     ),
     assert(
       href == null || onTap == null,
       'Card href and onTap are mutually exclusive',
     );