getMaterialType method

MaterialType? getMaterialType(
  1. String? type
)

Implementation

MaterialType? getMaterialType(String? type) {
  if (type == null || type.isEmpty) {
    return null;
  }

  switch (type) {
    case "canvas":
      return MaterialType.canvas;
    case "card":
      return MaterialType.card;
    case "circle":
      return MaterialType.circle;
    case "button":
      return MaterialType.button;
    case "transparency":
      return MaterialType.transparency;
    default:
      return null;
  }
}