material method

Widget material({
  1. Key? key,
  2. MaterialType type = MaterialType.canvas,
  3. double elevation = 0.0,
  4. Color? color,
  5. Color? shadowColor,
  6. Color? surfaceTintColor,
  7. TextStyle? textStyle,
  8. BorderRadiusGeometry? borderRadius,
  9. ShapeBorder? shape,
  10. bool borderOnForeground = true,
  11. Clip clipBehavior = Clip.none,
  12. Duration animationDuration = kThemeChangeDuration,
})

A piece of Material. Responsible for clipping, elevation, and ink effects.

If using to provide a splash surface, set type to MaterialType.transparency.

Implementation

Widget 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,
}) {
  return Material(
    key: key,
    type: type,
    elevation: elevation,
    color: color,
    shadowColor: shadowColor,
    surfaceTintColor: surfaceTintColor,
    textStyle: textStyle,
    borderRadius: borderRadius,
    shape: shape,
    borderOnForeground: borderOnForeground,
    clipBehavior: clipBehavior,
    animationDuration: animationDuration,
    child: this,
  );
}