refactor: update providers to use keepAlive for enhanced state management
- Changed multiple provider annotations to `@Riverpod(keepAlive: true)` to improve state retention and management across the application. - This update aligns with recent enhancements in state management practices, ensuring better performance and user experience throughout the app.
This commit is contained in:
@@ -5,14 +5,14 @@ import 'package:conduit/core/services/prompts_service.dart';
|
||||
|
||||
part 'prompts_providers.g.dart';
|
||||
|
||||
@riverpod
|
||||
@Riverpod(keepAlive: true)
|
||||
Future<List<Prompt>> promptsList(Ref ref) async {
|
||||
final promptsService = ref.watch(promptsServiceProvider);
|
||||
if (promptsService == null) return const <Prompt>[];
|
||||
return promptsService.getPrompts();
|
||||
}
|
||||
|
||||
@riverpod
|
||||
@Riverpod(keepAlive: true)
|
||||
class ActivePromptCommand extends _$ActivePromptCommand {
|
||||
@override
|
||||
String? build() => null;
|
||||
|
||||
Reference in New Issue
Block a user