Канал об Android (Андроид) разработке
Сайт - http://startandroid.ru
Чат - https://t.me/startandroidchat
Контакты - https://startandroid.ru/ru/about/cntct5.html
Реклама - https://startandroid.ru/ru/about/reklama.html
РКН - https://shorturl.at/p7iUr
Post #1600
5.07K
Object в sealed class обычно имеет не очень читабельную реализацию toString(). Это можно исправить с помощью data object.
#kotlin #sealed #data #class
https://www.youtube.com/watch?v=ovAqcwFhEGc
YouTube Data objects in Kotlin: pretty-print your objects! Kotlin 1.7.20 comes with a new experimental feature for object declarations that especially improves work with sealed classes. This new feature is called data objects. Adding the “data” modifier to your object declarations ensures they look nice and tidy… #kotlin #sealed #data #class
https://www.youtube.com/watch?v=ovAqcwFhEGc
- 👍 9

