chat_message_ui_kit 0.0.4
chat_message_ui_kit: ^0.0.4 copied to clipboard
A Flutter package for building chat and messaging UIs.
0.0.4 #
BREAKING CHANGES
- Message models and enums now come from
chat_message_core^0.0.4, and this package no longer exports them:MessageModel,TextMessageModel,ImageMessageModel,AudioMessageModel,VideoMessageModel,PartialTextModel,PartialImageModel,PartialAudioModel,PartialVideoModel,ChatUser,Room,StatusandMessageType. Migration: addchat_message_core: ^0.0.4to yourpubspec.yamland addimport 'package:chat_message_core/chat_message_core.dart';wherever you use these types. regexEmailandregexLinkare no longer exported. UseChatCoreRegex.regexEmailandChatCoreRegex.regexLinkfromchat_message_core. They arestatic final, notconst, so they can't be used in constant expressions.- Removed
getPreviewDataandPreviewSize.LinkPreviewnow usesChatCoreFunctions().getPreviewDatafromchat_message_core. Migration: if you callgetPreviewDatayourself, callChatCoreFunctions().getPreviewData(...)instead. It returns imagewidthandheightas0unless you pass animageSizeResolver. - Model behaviour now follows
chat_message_core0.0.4 (see its changelog). The changes most likely to affect you:toJson()emits nestedauthor,repliedMessageandpreviewDataas maps, soMessageModel.fromJson(message.toJson())now round-trips. Before, it threw a type error.- Message equality includes
type. AudioMessageModel.copyWithtreats an explicitnullas "clear this field", like the other models.
Features
Conditionalis now exported, soimageProviderBuildercallbacks can be written as named functions with the full signature.
Fixes
- The default sent, delivered, seen and error status icons are now Material icons (
Icons.done,Icons.done_all,Icons.error_outline). Before, they loaded image assets that this package doesn't ship, so they failed to load (and showed Flutter's error box in debug builds). Custom icons set throughChatTheme(deliveredIcon,seenIcon,errorIcon) still take precedence. LinkPreviewpicks up the link-preview fixes inchat_message_core0.0.4:- Direct image links show an image preview without downloading the image body first.
- Error responses (non-2xx) and non-HTML pages (PDF, video, ...) show only the link instead of a preview of the error page or garbage.
- Pages that declare a non-UTF-8 charset are decoded correctly. Before, they returned empty data.
- With
corsProxyset,PreviewData.linkholds the original URL instead of the proxied one. - A response counts as an image only when its
Content-Typestarts withimage/. Before, any content type containing "image", such asapplication/x-apple-diskimage, matched.
Example app
- Depends on
chat_message_corefor its models. - Dropped the Linux, macOS, Windows and web targets.
0.0.3 #
- Breaking: requires Dart SDK
^3.13.4(was^3.7.2). - Upgrade dependencies, including major bumps to
cached_network_image4.x anddiffutil_dart5.x.equatablenow accepts 2.x and 3.x. - Replace the deprecated
SizeTransition.axisAlignmentwithalignmentin the chat list and link preview animations. - Example app: Android builds with Gradle 9.3.1, AGP 9.1.0 and Java 17; iOS uses Swift Package Manager instead of CocoaPods, adopts the UIScene lifecycle and targets iOS 15+.
0.0.2 #
- misc fixes and improvements
0.0.1 #
- Initial release.