Raghav
08/24/2023, 6:22 AM@Stable
data class RemindersScreenState(
val reminders: ImmutableList<Reminder> = persistentListOf(),
val isLoading: Boolean = false,
val infoMessage: String? = null
)
Here is the output from Compose Compiler Metrics
stable class RemindersScreenState {
runtime val reminders: ImmutableList<Reminder>
stable val isLoading: Boolean
stable val infoMessage: String?
}
The Compose compiler cannot infer that variable reminders
is stable even though I have used ImmutableList
and the Reminder
class is considered stable. Does runtime val
means that the stability will be inferred at runtime?
stable class Reminder {
stable val agencyLaunchAttemptCount: Int?
stable val agencyLaunchAttemptCountYear: Int?
stable val failreason: String?
stable val holdreason: String?
stable val id: String
stable val image: String?
stable val infographic: String?
stable val lastUpdated: String?
stable val launchServiceProvider: LaunchServiceProvider?
stable val locationLaunchAttemptCount: Int?
stable val locationLaunchAttemptCountYear: Int?
stable val mission: Mission?
stable val name: String?
stable val net: String
stable val netPrecision: NetPrecision?
stable val orbitalLaunchAttemptCount: Int?
stable val orbitalLaunchAttemptCountYear: Int?
stable val pad: Pad?
stable val padLaunchAttemptCount: Int?
stable val padLaunchAttemptCountYear: Int?
stable val probability: String?
stable val rocket: Rocket?
stable val slug: String?
stable val status: Status?
stable val url: String?
stable val webcastLive: Boolean?
stable val windowEnd: String?
stable val windowStart: String?
<runtime stability> = Stable
}
I found this issue but it's mentioned that it is resolved in the newer versions but I'm using Compose Compiler v1.5.0 which was released way after when this issue was said to be resolved.