payam-zahedi / toastification

Toastification is a Flutter package for displaying customizable toast messages. It provides predefined widgets for success, error, warning, and info messages, as well as a custom widget for flexibility. With Toastification, you can add and manage multiple toast messages at the same time with ease.
https://payamzahedi.com/toastification/
BSD 3-Clause "New" or "Revised" License
564 stars 39 forks source link

ToastificationManager._createNotificationHolder (package:toastification/src/core/toastification_manager.dart:193:45) #99

Closed blackpink7 closed 4 months ago

blackpink7 commented 5 months ago

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: No Overlay widget found. Some widgets require an Overlay widget ancestor for correct operation. The most common way to add an Overlay to an application is to include a MaterialApp, CupertinoApp or Navigator widget in the runApp() call. The context from which that widget was searching for an overlay was: Navigator-[LabeledGlobalKey#cce4f]

0 Overlay.of. (package:flutter/src/widgets/overlay.dart:547:9)

1 Overlay.of (package:flutter/src/widgets/overlay.dart:550:6)

2 ToastificationManager._createNotificationHolder (package:toastification/src/core/toastification_manager.dart:193:45)

3 ToastificationManager.showCustom (package:toastification/src/core/toastification_manager.dart:60:7)

4 Toastification.showCustom (package:toastification/src/core/toastification.dart:140:20)

5 Toastification.show (package:toastification/src/core/toastification.dart:245:12)

6 init<…>

payam-zahedi commented 5 months ago

The error is saying that it can not find the Navigator in your app

Do you use Material App in your project?

how do you use toastification? Where do you get the context?

payam-zahedi commented 4 months ago

I will close this for now.

Feel free to open it if you had the same issue

blackpink7 commented 4 months ago

I will close this for now.

Feel free to open it if you had the same issue

thanks i did it