17 lines
472 B
Dart
17 lines
472 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'chatbot_controller.dart';
|
|
|
|
class ChatbotResetHelper {
|
|
static void resetChatbot(BuildContext context) {
|
|
try {
|
|
final container = ProviderScope.containerOf(context, listen: false);
|
|
container.read(chatbotControllerProvider.notifier).resetAll();
|
|
} catch (_) {
|
|
// If no ProviderScope is found (or provider is unavailable), ignore.
|
|
}
|
|
}
|
|
}
|
|
|