material method

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

Implementation

Widget material({
  Key? key,
  bool enabled = true,
  MaterialType type = MaterialType.transparency,
  double elevation = 0.0,
  Color? color,
  Color? shadowColor,
  TextStyle? textStyle,
  BorderRadiusGeometry? borderRadius,
  ShapeBorder? shape,
  bool borderOnForeground = true,
  Clip clipBehavior = Clip.none,
  Duration animationDuration = kThemeChangeDuration,
}) =>
    enabled
        ? Material(
            key: key,
            type: type,
            elevation: elevation,
            color: color,
            shadowColor: shadowColor,
            textStyle: textStyle,
            borderRadius: borderRadius,
            shape: shape,
            borderOnForeground: borderOnForeground,
            clipBehavior: clipBehavior,
            animationDuration: animationDuration,
            child: this,
          )
        : this;