Image and GIF Messages
Nexconn Chat UI supports SDK ImageMessage and GIFMessage messages. The standard input panel can pick images from the album or camera, and the message bubble displays a tappable media preview.
Send an Image
Use ChatProvider.sendImageMessage when you already have a local image path.
await chatProvider.sendImageMessage('/local/path/photo.jpg');
Send a GIF
Use ChatProvider.sendGifMessage for GIF files.
await chatProvider.sendGifMessage('/local/path/animation.gif');
Both helpers send media through the current BaseChannel.
await chatProvider.sendImageMessage(
'/local/path/photo.jpg',
needReceipt: true,
);
Default Picker
The built-in extension plugins can open the album or camera. Album image selection supports multiple assets. Camera image selection returns a single image.
ChatPageConfig(
inputConfig: MessageInputConfig(
extensionPlugins: [
MessageInputExtensionPlugin.photo(title: 'Photos'),
MessageInputExtensionPlugin.camera(title: 'Camera'),
],
),
)
When the selected asset is a GIF, the input widget sends a GIFMessage; otherwise it sends an ImageMessage.
The default picker requests permissions by plugin type. photo requests photo-library/media-library access. camera requests camera access only and does not request photo-library access first. If permission is denied or the user cancels selection, no message is sent.
Custom Picker
Provide mediaPathResolver or mediaDraftResolver if your app needs its own gallery, permission flow, compression, or upload preparation.
MessageInputExtensionPlugin.photo(
title: 'Photos',
mediaPathResolver: (context, plugin) async {
return '/local/path/photo.jpg';
},
)
Preview
PhotoPreviewPage can display image and GIF media messages. Remote download, caching, and final media availability are controlled by the underlying SDK message fields.