hashCode property
Media is hashed by content, as == compares it: the same bytes in
different buffers, or in views at different offsets, hash alike (#823).
See Message for the cost and for mutation.
Implementation
@override
int get hashCode => Object.hash(
text,
isUser,
_bytesHash(imageBytes),
Object.hashAll(images.map(_bytesHash)),
_bytesHash(audioBytes),
type,
toolName,
Object.hashAll(toolCalls),
toolCallId,
);