refactor: optimize providers with keepAlive for improved state management
- Updated multiple providers to use `@Riverpod(keepAlive: true)` for better state retention throughout the app lifecycle. - Enhanced `SocketConnectionStream` and `ConversationDeltaStream` with comments clarifying the purpose of public getters. - Improved error handling in the `_ChatPageState` by ensuring proper checks for mounted state before using context. - Added comments to clarify the rationale behind keepAlive usage in various providers, ensuring better maintainability and understanding of the codebase.
This commit is contained in:
@@ -407,7 +407,7 @@ bool _listEquals(List<String> a, List<String> b) {
|
||||
}
|
||||
|
||||
/// Provider for app settings
|
||||
@riverpod
|
||||
@Riverpod(keepAlive: true)
|
||||
class AppSettingsNotifier extends _$AppSettingsNotifier {
|
||||
bool _initialized = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user