The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
You're creating two instances of MaterialApp. The first one sets the URL path strategy for the app and then the second tries to do the same, which is causing the error.
I'm using this with Riverpod so I do in void main:
Then MyApp is like:
Where am I setting it twice?