v_chat_bubbles 1.0.0
v_chat_bubbles: ^1.0.0 copied to clipboard
A comprehensive Flutter chat bubble library supporting Telegram, WhatsApp, Messenger, and iMessage styles with full theming, callbacks, text formatting, and custom bubble support.
Changelog #
All notable changes to this project will be documented in this file.
1.0.0 #
Initial stable release of v_chat_bubbles.
Features #
Bubble Styles
- Telegram - Gradient bubbles with distinctive curved tails
- WhatsApp - Classic green/white bubbles with triangular tails
- Messenger - Blue gradient outgoing, gray incoming bubbles
- iMessage - Minimal design with subtle tails
- Custom - Fully customizable styling
Bubble Widgets
VTextBubble- Text messages with link preview supportVImageBubble- Single image messagesVVideoBubble- Video messages with thumbnail and durationVVoiceBubble- Voice messages with waveform visualizationVFileBubble- File attachments with type iconsVLocationBubble- Location sharing with map previewVContactBubble- Contact card sharingVPollBubble- Interactive polls (single/multiple choice)VCallBubble- Voice/video call historyVGalleryBubble- Multi-image gallery gridVStickerBubble- Sticker messagesVQuotedContentBubble- Quoted/shared contentVSystemBubble- System messagesVDateChip- Date separator chipsVDeletedBubble- Deleted message placeholderVCustomBubble<T>- Extensible custom bubble types
Text Formatting
- Inline formatting:
*bold*,_italic_,~strikethrough~,`code` - Block formatting: code blocks, blockquotes, bullet lists, numbered lists
- Pattern detection: URLs, emails, phone numbers, mentions, hashtags
- Custom patterns with regex support
Configuration System
VBubbleConfig- Master configuration objectVPatternConfig- Text pattern settingsVGestureConfig- Touch gesture settingsVAvatarConfig- Avatar display settingsVSizingConfig- Bubble dimension settingsVSpacingConfig- Spacing and padding settingsVMediaConfig- Media display settingsVTextExpansionConfig- Expandable text settingsVAnimationConfig- Animation timing settingsVAccessibilityConfig- Accessibility settingsVTranslationConfig- Localization strings
Theming
- Pre-built themes for all styles (light/dark variants)
VBubbleTheme.custom()for easy custom theming- Full color, typography, and gradient customization
- Style-specific reaction emoji sets
Callbacks
- Core: tap, long press, swipe reply, select, avatar tap, reply tap
- Grouped: reactions, pattern tap, media tap, menu item tap
- Type-specific: poll vote, location tap, contact tap, call tap, expand toggle, download
Custom Bubbles
VCustomBubbleDatabase class for custom data modelsCustomBubbleBuildertypedef for builder functionscustomBubbleBuildersmap for registering builders- Built-in examples:
VProductBubble,VReceiptBubble
Selection Mode
- Multi-select support with
isSelectionModeandselectedIds VDefaultMenuItems.selectfor triggering selection from context menu- Visual selection indicators on bubbles
Performance
- Span caching for parsed text
- Pattern list caching
- Block widget caching
- Text direction caching
- Optimized
shouldRepaintin all painters IntrinsicWidthfor proper bubble sizing
Accessibility
- Semantic labels for screen readers
- Configurable minimum tap target sizes
- High contrast mode support
- RTL text direction detection
Localization
- Built-in English and Arabic translations
VTranslationConfig.forLocale()factory- All user-facing strings configurable
Dependencies #
v_platform- Cross-platform file handlingv_chat_voice_player- Voice message playbackvideo_player- Video playback supportintl- Date/time formatting