I am getting this error...
code snippet that is throwing this error:
catalog.desc.text.textStyle(context.captionStyle).make(),
I am getting this error...
code snippet that is throwing this error:
catalog.desc.text.textStyle(context.captionStyle).make(),
Copyright © 2021 Jogjafile Inc.
Your object
context.captionStylehas theTextStyle?type, which means it can benull. The.textStyle()function only acceptsTextStyleobjects, hence the error.You either have to make sure that
context.captionStyleis notnullbefore trying to pass it to.textStyle(), or assuring the compiler it will never benullby writing.textStyle(context.captionStyle!)(but you will still get an error if it becomesnullsomehow).