toJson method
Converts an instance of UserList to a JSON map.
This method is used to serialize UserList instances into a map structure that can easily be converted to JSON. This is useful for storing the instance in a database or sending it over a network.
Returns: A map representing the serialized form of the UserList instance.
Implementation
Map<String, dynamic> toJson() => {
"data": data == null
? null
: List<dynamic>.from(data!.map((x) => x.toJson())),
"status": status,
};