Material constructor
const
Material({
- Key? key,
- MaterialType type = MaterialType.canvas,
- double elevation = 0.0,
- Color? color,
- Color? shadowColor,
- Color? surfaceTintColor,
- TextStyle? textStyle,
- BorderRadiusGeometry? borderRadius,
- ShapeBorder? shape,
- bool borderOnForeground = true,
- Clip clipBehavior = Clip.none,
- Duration animationDuration = kThemeChangeDuration,
- Widget? child,
Implementation
const Material({
super.key,
this.type = MaterialType.canvas,
this.elevation = 0.0,
this.color,
this.shadowColor,
this.surfaceTintColor,
this.textStyle,
this.borderRadius,
this.shape,
this.borderOnForeground = true,
this.clipBehavior = Clip.none,
this.animationDuration = kThemeChangeDuration,
this.child,
}) : assert(elevation >= 0.0),
assert(!(shape != null && borderRadius != null)),
assert(!(identical(type, MaterialType.circle) &&
(borderRadius != null || shape != null)));