toMap method
Creates a map in which the properties of this instance are contained.
Only non-null properties will be present in that map.
Implementation
Map<String, dynamic> toMap() {
final result = <String, dynamic>{};
if (frameWidth != null) {
result['frameWidth'] = frameWidth;
}
if (frameHeight != null) {
result['frameHeight'] = frameHeight;
}
if (frameX != null) {
result['frameX'] = frameX;
}
if (frameY != null) {
result['frameY'] = frameY;
}
if (alphaValue != null) {
result['alphaValue'] = alphaValue;
}
if (cornerRadius != null) {
result['cornerRadius'] = cornerRadius;
}
if (cornerMask != null) {
result['cornerMask'] = cornerMask;
}
if (material != null) {
result['material'] = material!.index;
}
if (state != null) {
result['state'] = state!.name;
}
return result;
}