Update: 2026-06-23 17:57:07

This commit is contained in:
Hamza-Ayed
2026-06-23 17:57:07 +03:00
parent 6ad7aceee1
commit eafc04a091
3 changed files with 35 additions and 4 deletions

View File

@@ -242,7 +242,7 @@ class _SnackContentState extends State<_SnackContent>
// ─────────────────────────────────────────────────────────────────────────────
SnackbarController? _show(_SnackVariant variant, String message) {
// Prevent crash if Navigator or Overlay context is not yet initialized at early startup
if (Get.context == null || Get.overlayContext == null) {
if (Get.context == null || Get.overlayContext == null || Get.key.currentState?.overlay == null) {
debugPrint("⚠️ Cannot show snackbar: Overlay/Navigator is not ready yet. Message: $message");
return null;
}