feat: add web search availability provider and enhance feature toggles in chat and tools modal

This commit is contained in:
cogwheel0
2025-08-24 20:55:51 +05:30
parent cc46799e20
commit 4cd00e9193
5 changed files with 77 additions and 47 deletions

View File

@@ -65,7 +65,12 @@ class _EnhancedImageAttachmentState
parent: _animationController,
curve: Curves.easeInOut,
);
_loadImage();
// Defer loading until after first frame to avoid accessing inherited widgets
// (e.g., Localizations) during initState
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!mounted) return;
_loadImage();
});
}
@override