One of the downsides of the JSFunction type is that it deviates from JSON standard. Thus, the code works if you splat it into an HTML page, but you can't read the JSON from an endpoint.
Factor out the usage as much as possible, so that external JSON files can be read.
[ ] lineargradient and radialgradient as Dict or types
One of the downsides of the
JSFunction
type is that it deviates from JSON standard. Thus, the code works if you splat it into an HTML page, but you can't read the JSON from an endpoint.Factor out the usage as much as possible, so that external JSON files can be read.
lineargradient
andradialgradient
asDict
or types