useEnhancedComponents property
Whether to use enhanced UI components with additional visual effects.
When set to true, the widget uses enhanced builders that provide:
Enhanced Code Blocks (EnhancedCodeBlockBuilder):
- Copy-to-clipboard button (appears on hover or always visible on mobile)
- Language tag display in top-right corner
- Subtle shadow and border effects
- Smooth hover animations
Enhanced Blockquotes (EnhancedBlockquoteBuilder):
- Quote icon (💭) at the start
- Gradient background with theme-aware colors
- Drop shadow for depth
- Colored left border accent
Enhanced Links (EnhancedLinkBuilder):
- Smooth hover animations with scale effect
- Animated underline on hover
- External link indicator icon (🔗)
- Color transitions
Enhanced Headers (EnhancedHeaderBuilder):
- Colored accent markers for H1 and H2
- Gradient bottom border
- Improved spacing and visual hierarchy
Defaults to false for standard rendering.
Example:
// Standard rendering
SmoothMarkdown(
data: markdownText,
useEnhancedComponents: false, // default
)
// Enhanced rendering with visual effects
SmoothMarkdown(
data: markdownText,
useEnhancedComponents: true,
)
Note: Enhanced components may have slightly higher rendering cost due to
additional decorations and animations. For maximum performance with large
documents, keep this set to false.
Implementation
final bool useEnhancedComponents;