toast not appear when i use GlobalKey() to get context in the same screen , i have to show toast inside dio interceptor,there is not context so i have to use GlobalKey() to enable me to navigate to other screen ,but toast not appear and give me this error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error: Context is null, Please call init(context) before showing toast.
toast not appear when i use GlobalKey() to get context in the same screen , i have to show toast inside dio interceptor,there is not context so i have to use GlobalKey() to enable me to navigate to other screen ,but toast not appear and give me this error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error: Context is null, Please call init(context) before showing toast.