toMap method
Converts the ConsoleLogEvent to a map, adapting the output specifically for console logging.
This method overrides the base toMap
to tailor the map output for better readability and formatting
when dealing with console logs. The method organizes event data in a manner that enhances clarity
when output to console.
Returns a map representation of the console log event, which includes the event name and any relevant parameters.
Implementation
@override
Map<String, dynamic> toMap() {
return {
'name': eventName,
'parameters': {
'message': eventMessage ?? 'No message provided',
},
};
}