Card.outlined constructor

const Card.outlined({
  1. Key? key,
  2. Color? color,
  3. Color? shadowColor,
  4. Color? surfaceTintColor,
  5. double? elevation,
  6. ShapeBorder? shape,
  7. bool borderOnForeground = true,
  8. EdgeInsetsGeometry? margin,
  9. Clip? clipBehavior,
  10. Widget? child,
  11. bool semanticContainer = true,
})

Create an outlined variant of Card.

Outlined cards have a visual boundary around the container. This can provide greater emphasis than the other types.

The card's outline is defined by the shape property. By default, the card uses a RoundedRectangleBorder with a 12.0 corner radius, a 1.0 border width, and the color from ColorScheme.outlineVariant. If you provide a custom shape, it is recommended to use an OutlinedBorder with a non-null OutlinedBorder.side to keep a visible outline.

If ThemeData.useMaterial3 is false, this constructor is equivalent to the default constructor of Card.

Implementation

const Card.outlined({
  super.key,
  this.color,
  this.shadowColor,
  this.surfaceTintColor,
  this.elevation,
  this.shape,
  this.borderOnForeground = true,
  this.margin,
  this.clipBehavior,
  this.child,
  this.semanticContainer = true,
}) : assert(elevation == null || elevation >= 0.0),
     _variant = _CardVariant.outlined;