deepCopy method
Deep copy the object.
Implementation
Sp3dMaterial deepCopy() {
var mbg = Color.fromARGB(bg.alpha, bg.red, bg.green, bg.blue);
var msc = Color.fromARGB(strokeColor.alpha, strokeColor.red,
strokeColor.green, strokeColor.blue);
List<Offset>? tCoord;
if (textureCoordinates != null) {
tCoord = [];
for (Offset o in textureCoordinates!) {
tCoord.add(Offset(o.dx, o.dy));
}
}
return Sp3dMaterial(mbg, isFill, strokeWidth, msc,
imageIndex: imageIndex,
textureCoordinates: tCoord,
name: name,
option: option != null ? {...option!} : null);
}