In Kotlin, if you don't want to initialize a class property inside the constructor or in the top of the class body, you have basically these two options (from the language reference):
https://agrawalsuneet.github.io/blogs/lateinit-vs-lazy-property-in-kotlin/
网友评论