cometchat_cards 1.0.1
cometchat_cards: ^1.0.1 copied to clipboard
CometChat Card Schema renderer — converts Card JSON into Flutter widgets.
1.0.1 #
New
- Added
urlfield toCometChatCardIconElementto support explicit CDN URLs for icon assets alongside the existingnamefield.
Enhancements
- Improved dark mode rendering in
CometChatCardView— card backgrounds and borders that are too light for dark mode now automatically fall back to the resolved theme's dark colors. - Refactored
ColumnElementRendererto useLayoutBuilderfor detecting unbounded (infinite width) contexts, preventing layout crashes inside horizontally scrollable parents. - Updated
GridElementRendererto handle infinite width constraints gracefully by falling back to a default width of 300dp. - Updated
IconElementRendererto prefer the new expliciturlfield over the legacynamefield for resolving icon assets. - Enhanced
resolveUrlutility to handle icon object format ({ "name": "...", "url": "https://..." }). - Made
fallbackTextoptional inCometChatCardSchemaparsing — defaults to an empty string when not provided in the JSON payload.
Fixes
- Fixed
ButtonElementRendererincorrectly applyingfullWidthbehavior — buttons now consistently use intrinsic width sizing. - Fixed
ColumnElementRenderercrash when nested inside a scrollable row due toCrossAxisAlignment.stretchin unbounded contexts. - Fixed
GridElementRenderercrash with "BoxConstraints forces an infinite width" error when placed inside a horizontally scrollable parent.
1.0.0 #
New
- Added the
CometChatCardViewwidget to render card schemas from JSON, making it easier to display dynamic card-based interfaces in applications. - Added
CometChatCardViewControllerto enable programmatic control over card behavior and rendering. - Added
CometChatCardElementRegistryto support custom element registration for extending card capabilities. - Added
CometChatCardParserto deserialize JSON payloads into strongly typed card models. - Added
CometChatCardRenderContextto pass rendering state through the card tree for more consistent UI behavior. - Added
CometChatCardConfigurationto provide centralized control over global rendering options. - Added structured logging through
CometChatCardLogger, with configurable log levels for improved debugging and observability. - Added the core card data models, including
CometChatCardSchema,CometChatCardElement,CometChatCardAction, andCometChatCardActionEvent, to support schema-driven card rendering and action handling. - Added styling models including
CometChatCardContainerStyle,CometChatCardColorValue, andCometChatCardPaddingto support flexible and theme-aware card presentation. - Added layout renderers including
Column,Row,Grid,Tabs, andAccordionto support a wide range of card layouts. - Added content renderers including
Text,Image,Avatar,Badge,Chip,CodeBlock,Divider,Icon,Markdown,ProgressBar, andSpacerto support rich card content. - Added interactive renderers including
Button,IconButton, andLinkto support user actions within cards. - Added the
Tabledata renderer to display structured tabular content inside cards. - Added a theme system with
CometChatCardThemeOverride,CometChatCardDefaultTheme,CometChatCardResolvedTheme, andCometChatCardColorResolverto support consistent theming across card components. - Added support for
CometChatCardThemeMode, including light, dark, and system modes, to improve visual consistency across environments. - Added
CometChatCardActionEmitteras a stream-based action event system for handling card interactions. - Added utility helpers including
HexColor,MarkdownParser,PaddingResolver, andSizeResolverto simplify common rendering and formatting tasks. - Added a multi-platform sample app for Android, iOS, Web, macOS, Linux, and Windows to help teams evaluate and implement card experiences across platforms.
Enhancements
- None
Fixes
- None