toJson method
Converts the screen data to a JSON representation.
Implementation
@override
/// Converts the screen data to a JSON representation.
Map<String, dynamic> toJson() {
return {
...super.toJson(),
if (userId != null) 'userId': userId,
if (anonymousId != null) 'anonymousId': anonymousId,
};
}