can you add more code to it if you are using the context above the MaterialApp there no Navigator is found try getting context below the MaterialApp in the widget tree;