getMaterialType method
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;
}
}