TListCardTheme class

Theme configuration for TListCard.

TListCardTheme defines the visual style of list items/cards, including:

  • Background colors (normal, selected, disabled)
  • Padding and indentation
  • Builders for indicators (selection, expansion) and content

Constructors

TListCardTheme({required Color backgroundColor, required Color selectedBackgroundColor, required Color disabledBackgroundColor, required Widget expansionIndicatorBuilder(bool isExpanded, bool isDisabled), required Widget selectionIndicatorBuilder(bool multiple, bool isSelected, bool isDisabled), required Widget contentBuilder(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled), bool showSelectionIndicator = true, EdgeInsets padding = const EdgeInsets.symmetric(vertical: 7.5, horizontal: 15), double levelIndentation = 18.0, BorderRadius borderRadius = BorderRadius.zero, EdgeInsets margin = EdgeInsets.zero})
Creates a list card theme.
const
TListCardTheme.defaultTheme(ColorScheme colors, {bool forceCache = true, double iconSize = 18.0, double fontSize = 15.0, double subtitleFontSize = 11.5})
Creates a default theme derived from the context colors.
factory

Properties

backgroundColor → Color
final
borderRadius → BorderRadius
final
contentBuilder → Widget Function(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled)
final
disabledBackgroundColor → Color
final
expansionIndicatorBuilder → Widget Function(bool isExpanded, bool isDisabled)
final
hashCode → int
The hash code for this object.
no setterinherited
levelIndentation → double
final
margin → EdgeInsets
Outer space around the item's hoverable/selectable surface (the Material it's drawn on), as opposed to padding which is inner content padding within that surface. Non-zero together with borderRadius is what makes the hover/selection highlight read as an inset rounded rect instead of a full-bleed flush row — e.g. to match a dropdown menu's item style in a compact popup.
final
padding → EdgeInsets
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedBackgroundColor → Color
final
selectionIndicatorBuilder → Widget Function(bool multiple, bool isSelected, bool isDisabled)
final
showSelectionIndicator → bool
final

Methods

copyWith({Color? backgroundColor, Color? selectedBackgroundColor, Color? disabledBackgroundColor, EdgeInsets? padding, double? levelIndentation, bool? showSelectionIndicator, BorderRadius? borderRadius, EdgeInsets? margin, Widget expansionIndicatorBuilder(bool isExpanded, bool isDisabled)?, Widget selectionIndicatorBuilder(bool multiple, bool isSelected, bool isDisabled)?, Widget contentBuilder(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled)?}) → TListCardTheme
Creates a copy of the theme with updated properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

defaultContentBuilder(ColorScheme colors, {bool forceCache = true, double fontSize = 15.0, double subtitleFontSize = 11.5}) → Widget Function(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled)
defaultExpansionIndicatorBuilder(ColorScheme colors, {double iconSize = 18.0}) → Widget Function(bool isExpanded, bool isDisabled)
defaultSelectionIndicatorBuilder(ColorScheme colors, {double iconSize = 18.0}) → Widget Function(bool multiple, bool isSelected, bool isDisabled)