refactor(firebase-ai): use explicit backing fields and the new onDeviceExtension#2804
refactor(firebase-ai): use explicit backing fields and the new onDeviceExtension#2804thatfiredev wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors several ViewModels to use Kotlin's explicit backing fields for UI state and message flows, and updates the Kotlin version to 2.4.0. However, the refactoring introduces critical compilation errors across multiple files (including HybridInferenceViewModel, ChatViewModel, ServerPromptTemplateViewModel, and SvgViewModel). In Kotlin, explicit backing fields are only accessible within the property's own accessors and cannot be mutated or accessed from other member functions. Since these properties are exposed as read-only StateFlow types, attempting to update them or set their values from other methods will fail to compile. It is recommended to revert to the traditional private _uiState / public uiState pattern.
|
Ignoring the Gemini reviews because the code compiles successfully |
Uh oh!
There was an error while loading. Please reload this page.