toJSON method
Implementation
Map<String, dynamic> toJSON() {
final Map<String, dynamic> data = {
'totalUsers': totalUsers.toString(),
'totalLocations': totalLocations.toString(),
};
// Se agregan los conteos de cada ubicación.
locationCounts?.forEach((key, value) {
data[key] = value.toString();
});
return data;
}