Flutter not able to run, get_navigation & theme error

I also had this problem today after upgrading Flutter.

I was only able to solve it after I deleted that method parameter from the file that triggered the error. You'll have to delete it in two places.

Search in .pub-cache/hosted/pub.dartlang.org/get-3.15.0/lib/get_navigation/src/extension_navigation.dart for

Theme.of(key.currentContext, shadowThemeOnly: true)

As replace it with

Theme.of(key.currentContext)

This is probably cause by the stacked_services dependency that uses the get: ^3.15.0 dependency

Later edit: this is actually not the best solution, because somebody cloning your repo will not be able to compile the project unless they also to this change

So it's better to upgrade the dependency that causes this error, or replace it with another one; but only after you ran flutter upgrade, or try changing the channel


this is already fixed by getx in 16.1. Pub upgrade will do it

https://github.com/jonataslaw/getx/issues/762