card method

Widget card({
  1. TCardShadow shadow = TCardShadow.none,
  2. EdgeInsetsGeometry padding = const EdgeInsets.all(12),
  3. EdgeInsetsGeometry margin = EdgeInsets.zero,
  4. BorderRadius? borderRadius,
  5. Color? backgroundColor,
  6. Color? borderColor,
  7. VoidCallback? onTap,
})

Wraps this widget in a TCard with a preset shadow depth.

Unlike a bare TCard, the margin defaults to zero and the padding to EdgeInsets.all(12) so it can be dropped around any tile or block. Usage: TTile(title: 'Hello').card(shadow: TCardShadow.md)

Implementation

Widget card({
  TCardShadow shadow = TCardShadow.none,
  EdgeInsetsGeometry padding = const EdgeInsets.all(12),
  EdgeInsetsGeometry margin = EdgeInsets.zero,
  BorderRadius? borderRadius,
  Color? backgroundColor,
  Color? borderColor,
  VoidCallback? onTap,
}) {
  return TCard(
    shadowLevel: shadow,
    padding: padding,
    margin: margin,
    borderRadius: borderRadius,
    backgroundColor: backgroundColor,
    borderColor: borderColor,
    onTap: onTap,
    child: this,
  );
}