toDocument method
Implementation
@override
Map<String, Object?> toDocument() {
Map<String, Object?> theDocument = HashMap();
if (r != null) {
theDocument["r"] = r;
} else {
theDocument["r"] = null;
}
if (g != null) {
theDocument["g"] = g;
} else {
theDocument["g"] = null;
}
if (b != null) {
theDocument["b"] = b;
} else {
theDocument["b"] = null;
}
if (opacity != null) {
theDocument["opacity"] = opacity;
} else {
theDocument["opacity"] = null;
}
return theDocument;
}