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: 5, horizontal: 15), double levelIndentation = 18.0})
-
Creates a list card theme.
const
- TListCardTheme.defaultTheme(ColorScheme colors)
-
Creates a default theme derived from the context colors.
factory
Properties
- backgroundColor → Color
-
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
- 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, 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) → Widget Function(String title, String? subTitle, String? imageUrl, bool isSelected, bool isDisabled) -
defaultExpansionIndicatorBuilder(
ColorScheme colors) → Widget Function(bool isExpanded, bool isDisabled) -
defaultSelectionIndicatorBuilder(
ColorScheme colors) → Widget Function(bool multiple, bool isSelected, bool isDisabled)