CardSection constructor
const
CardSection({
- Key? key,
- Widget? leading,
- String? thumbHash,
- Widget? trailing,
- double leadingThreshold = 300,
- double trailingThreshold = 350,
- Widget? title,
- Widget? subtitle,
- bool essentialLeading = false,
- bool essentialTrailing = true,
- VoidCallback? onPressed,
- IconData? leadingIcon,
- String? titleText,
- String? subtitleText,
- List<
Widget> children = const [], - bool dashedBorder = false,
Creates a CardSection with customizable header and content.
key: Standard Flutter key for widget identification.leading: Optional leading widget (e.g., icon or image) shown on wider screens or when essential.thumbHash: Optional thumbhash string for generating a blurred background image in theGlowCard.trailing: Optional trailing widget (e.g., action button) shown on wider screens or when essential.leadingThreshold: Screen width threshold (default 300) below which leading is hidden unless essential.trailingThreshold: Screen width threshold (default 350) below which trailing is hidden unless essential.title: Optional Widget for the section title, or usetitleTextfor simple text.subtitle: Optional Widget for the section subtitle, or usesubtitleTextfor simple text.essentialLeading: If true, forces leading to always show regardless of width.essentialTrailing: If true (default), forces trailing to always show regardless of width.onPressed: Optional callback for handling press events on the section.leadingIcon: Optional IconData to display as a FancyIcon if noleadingprovided.titleText: Simple string for title if notitlewidget provided; rendered as Text.subtitleText: Simple string for subtitle if nosubtitlewidget provided; rendered as Text.children: List of Widgets for the section body; separated by Divider if non-empty.dashedBorder: If true, applies a dashed border style to theGlowCard.
Usage example: CardSection(title: Text('Details'), children: [BasicCard(...)]) for structured content in screens.
Implementation
const CardSection(
{super.key,
this.leading,
this.thumbHash,
this.trailing,
this.leadingThreshold = 300,
this.trailingThreshold = 350,
this.title,
this.subtitle,
this.essentialLeading = false,
this.essentialTrailing = true,
this.onPressed,
this.leadingIcon,
this.titleText,
this.subtitleText,
this.children = const [],
this.dashedBorder = false});