Ahmed
02/20/2025, 6:35 AMcontentType
in LazyLayouts optimise performance by reusing the composeable. I am catering for a use-case where the user can toggle between grid and single row cells. More in 🧵Ahmed
02/20/2025, 6:36 AMcontentType = {
when (it) {
is ListingModel -> if (isFatCard) "FatCard" else if (isGridView) "ListingCell" else "ListingRow"
is AdModel -> "AdPlaceholderModel"
is HeaderModel -> "HeaderModel"
}
},
Ahmed
02/20/2025, 6:37 AMGridItemSpan
Ahmed
02/20/2025, 6:38 AMAhmed
02/20/2025, 6:40 AMGridItemSpan(2)
2. Fat Rectangle GridItemSpan(2)
3. Square GridItemSpan(1)
Ahmed
02/20/2025, 6:41 AMit
, class
or if current way of doing it is the most optimal.Kashismails
02/21/2025, 3:54 PM