toJson abstract method
Converts the state object to a JSON map.
Implement this method to serialize your state to JSON.
Example:
@override
Map<String, dynamic>? toJson(UserProfile? data) {
return data?.toJson();
}
@param data The state object to serialize, or null @return The serialized JSON map, or null if data is null
Implementation
Map<String, dynamic>? toJson(T? data);