Search code examples
flutterdartroutesnavigationflutter-go-router

Can a Map of data be passed as a parameter in go_router?


I want to pass a map of complex data as a parameter to a GoRoute(). However, from what I can see, the param is a String. I tried converting my Map -> String, but it immediately causes all sorts of errors due to format errors: Unexpected character (at character 2).

Im most likely going about this the incorrect way.

Is it even possible to send a Map of data as a parameter in GoRouter?


Solution

  • It can be done, but JsonEncode and then JsonDecode on the other side, I have performed it incorrectly