canHandle method
Determines whether this builder can handle the given message
and
attachments
. If this returns true
, build will be called.
Otherwise, the next builder in the list will be called.
Implementation
@override
bool canHandle(
Message message,
Map<String, List<Attachment>> attachments,
) {
final images = attachments[AttachmentType.image];
return images != null && images.length == 1;
}