You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a problem with the fromJson method in a web application hosted on firebase. I use flutter as the frontend and dart_frog as the backend, in both I use exactly the same model and send exactly the same data and when the frontend sends it to the backend, it receives it without any problem, but when the backend sends it to the frontend it throws an error like this on the screenshot.
Note:
'1.' on screenshot is before jsonDecode
'2.' on screenshot is after jsonDecode
Uncaught TypeError occurs at MyModel.fromJson
And same model and same request in backend logs:
To Reproduce
Create model with union type using freezed.
Build flutter web app and deploy it on firebase hosting.
Expected behavior
After building the web app and deploying it should work
The text was updated successfully, but these errors were encountered:
This is model: @freezed
class BackendData with _$BackendData {
@JsonSerializable(explicitToJson: true)
const factory BackendData.deviceData({ @jsonkey(name: 'device_data') required final BackendDeviceData deviceData,
}) = _DeviceData;
Describe the bug
I have a problem with the fromJson method in a web application hosted on firebase. I use flutter as the frontend and dart_frog as the backend, in both I use exactly the same model and send exactly the same data and when the frontend sends it to the backend, it receives it without any problem, but when the backend sends it to the frontend it throws an error like this on the screenshot.
Note:
'1.' on screenshot is before jsonDecode
'2.' on screenshot is after jsonDecode
Uncaught TypeError occurs at MyModel.fromJson
And same model and same request in backend logs:
To Reproduce
Expected behavior
After building the web app and deploying it should work
The text was updated successfully, but these errors were encountered: