I only got it working after I changed the code to the following:
title: 'My App',
Otherwise, the navigatorKey would not contain any state.
Thanks. Now I noticed that I made a typo
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.