cometchat_cards 1.0.1 copy "cometchat_cards: ^1.0.1" to clipboard
cometchat_cards: ^1.0.1 copied to clipboard

CometChat Card Schema renderer — converts Card JSON into Flutter widgets.

1.0.1 #

New

  • Added url field to CometChatCardIconElement to support explicit CDN URLs for icon assets alongside the existing name field.

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 ColumnElementRenderer to use LayoutBuilder for detecting unbounded (infinite width) contexts, preventing layout crashes inside horizontally scrollable parents.
  • Updated GridElementRenderer to handle infinite width constraints gracefully by falling back to a default width of 300dp.
  • Updated IconElementRenderer to prefer the new explicit url field over the legacy name field for resolving icon assets.
  • Enhanced resolveUrl utility to handle icon object format ({ "name": "...", "url": "https://..." }).
  • Made fallbackText optional in CometChatCardSchema parsing — defaults to an empty string when not provided in the JSON payload.

Fixes

  • Fixed ButtonElementRenderer incorrectly applying fullWidth behavior — buttons now consistently use intrinsic width sizing.
  • Fixed ColumnElementRenderer crash when nested inside a scrollable row due to CrossAxisAlignment.stretch in unbounded contexts.
  • Fixed GridElementRenderer crash with "BoxConstraints forces an infinite width" error when placed inside a horizontally scrollable parent.

1.0.0 #

New

  • Added the CometChatCardView widget to render card schemas from JSON, making it easier to display dynamic card-based interfaces in applications.
  • Added CometChatCardViewController to enable programmatic control over card behavior and rendering.
  • Added CometChatCardElementRegistry to support custom element registration for extending card capabilities.
  • Added CometChatCardParser to deserialize JSON payloads into strongly typed card models.
  • Added CometChatCardRenderContext to pass rendering state through the card tree for more consistent UI behavior.
  • Added CometChatCardConfiguration to 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, and CometChatCardActionEvent, to support schema-driven card rendering and action handling.
  • Added styling models including CometChatCardContainerStyle, CometChatCardColorValue, and CometChatCardPadding to support flexible and theme-aware card presentation.
  • Added layout renderers including Column, Row, Grid, Tabs, and Accordion to support a wide range of card layouts.
  • Added content renderers including Text, Image, Avatar, Badge, Chip, CodeBlock, Divider, Icon, Markdown, ProgressBar, and Spacer to support rich card content.
  • Added interactive renderers including Button, IconButton, and Link to support user actions within cards.
  • Added the Table data renderer to display structured tabular content inside cards.
  • Added a theme system with CometChatCardThemeOverride, CometChatCardDefaultTheme, CometChatCardResolvedTheme, and CometChatCardColorResolver to support consistent theming across card components.
  • Added support for CometChatCardThemeMode, including light, dark, and system modes, to improve visual consistency across environments.
  • Added CometChatCardActionEmitter as a stream-based action event system for handling card interactions.
  • Added utility helpers including HexColor, MarkdownParser, PaddingResolver, and SizeResolver to 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
0
likes
130
points
417
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

CometChat Card Schema renderer — converts Card JSON into Flutter widgets.

License

MIT (license)

Dependencies

cached_network_image, flutter, shimmer

More

Packages that depend on cometchat_cards