toMap method

Map<String, dynamic> toMap()

Converts the PlaybackError object to a map.

The returned map contains the following keys:

  • errorCode: The error code identifying the type of error that occurred.
  • message: The error message describing the playback error.
  • stackTrace: The stack trace of the error.

The returned map is typically used to serialize the error to JSON or to pass the error to a platform channel.

Implementation

Map<String, dynamic> toMap() {
  return {
    "errorCode": errorCode,
    "message": message,
    "stackTrace": stackTrace,
  };
}