-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Go Router extra in context.push is looking for toJson function #134017
Copy link
Copy link
Closed
Labels
r: invalidIssue is closed as not validIssue is closed as not valid
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- Add custom extra

2. Try to push the new screen and add extra
- Check error
Expected results
It should normally push the extra in new screen
Actual results
It shows an error looking for toJson method
Code sample
Code sample
Future<T?> navPush<T>(
BuildContext context,
String name, {
bool shouldPop = false,
Object? extra,
}) async {
if (shouldPop) {
context.go('/');
}
if (extra != null) {
return context.pushNamed(name, extra: extra);
}
context.goNamed(name, extra: extra);
return null;
}
navPush(
context,
'designList',
extra: DesignListArguments(
dpkId: dpk.id,
isGrid: isGrid,
designsFilterStore: designsFilterStore,
),
);
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
r: invalidIssue is closed as not validIssue is closed as not valid




