I have a flutter app for mobile which I am porting to web. So I am using Go Router package
and moving from Navigator.of to context.go
. Following is a code sample from my app. How can I send all this data with context.go.
P.S I tried using extra object, but when I go front and back multiple times
with browser buttons
my custom object looses type information and is converted to Map<String, dynamic>
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ListenableProvider(
create: (_) => GoalDetailViewModel(
currentStatus: GoalStatus.open,
goalId: model.id,
goalTitle: model.details.title,
goalUrl: model.details.url,
isScreenGoal: model.type.toLowerCase() == 'goal'),
child: const GoalDetailScreen())));