imageUploader property
Optional uploader for image attachments. When the host wires this, picked photos are routed through the uploader BEFORE the chat request: the uploader returns a HTTPS URL (e.g. Firebase Storage download URL) which is then sent to the chat backend instead of inline base64. Keeps the backend DB tiny and lets the client render images from CDN.
When not provided, picked photos still work — they ride inline in the request body as base64. Use the inline path for quick prototyping; wire an uploader for production traffic.
The uploader signature is Future<String> Function(Uint8List bytes, String mimeType). Throw to force the inline-b64 fallback for a
specific upload.
Implementation
final ChatImageUploader? imageUploader;