ListDataTileStyle class abstract
A sealed class that defines the style of a list tile.
It contains a constructor that takes in the following parameters:
- backgroundColor: the background color of the list tile.
foregroundColor: the foreground color of the list tile.evenBackgroundColor: the background color of the list tile at even indices.evenForegroundColor: the foreground color of the list tile at even indices.hoverBackgroundColor: the background color of the list tile when hovered.evenHoverBackgroundColor: the background color of the list tile at even indices when hovered.selectedColor: the color of the selected list tile.- textStyle: the text style of the list tile.
- trailingIcon: the trailing icon of the list tile.
- withCheckboxIcon: whether to show the checkbox icon of the list tile.
- checkboxIcon: the checkbox icon of the list tile.
- selectedCheckboxIcon: the selected checkbox icon of the list tile.
It also contains a factory method ListDataTileStyle.of which takes in the same parameters as the constructor and returns a ListDataTileStyle object.
The default values of the parameters are as follows:
foregroundColor: Theme.of(context).colorScheme.onSurfaceevenBackgroundColor: Theme.of(context).colorScheme.onSurface.withAlpha(30)evenForegroundColor:foregroundColor ?? Theme.of(context).colorScheme.onSurfacehoverBackgroundColor: Theme.of(context).colorScheme.primary.withAlpha(50)evenHoverBackgroundColor:hoverBackgroundColor ?? Theme.of(context).colorScheme.primary.withAlpha(100)selectedColor: SelectedTileColor.of(context)
- Available extensions
- Annotations
-
- @freezed
Constructors
- ListDataTileStyle({Color? backgroundColor, Color? foregroundColor, Color? evenBackgroundColor, Color? evenForegroundColor, Color? hoverBackgroundColor, Color? evenHoverBackgroundColor, @Default.new(SelectedTileColor.empty) SelectedTileColor selectedColor, TextStyle? textStyle, Widget? trailingIcon, @Default.new(true) bool withCheckboxIcon, Widget? checkboxIcon, Widget? selectedCheckboxIcon})
-
A factory method that creates a ListDataTileStyle object.
constfactory
- ListDataTileStyle.of(BuildContext context, {Color? backgroundColor, Color? foregroundColor, Color? evenBackgroundColor, Color? evenForegroundColor, Color? hoverBackgroundColor, Color? evenHoverBackgroundColor, SelectedTileColor? selectedColor, TextStyle? textStyle, Widget? trailingIcon, bool? withCheckboxIcon, Widget? checkboxIcon, Widget? selectedCheckboxIcon})
-
A factory method that creates a ListDataTileStyle object with default values taken from the given BuildContext.
factory
Properties
- backgroundColor → Color?
-
no setterinherited
- checkboxIcon → Widget?
-
no setterinherited
-
copyWith
→ $ListDataTileStyleCopyWith<
ListDataTileStyle> -
Create a copy of ListDataTileStyle
with the given fields replaced by the non-null parameter values.
no setterinherited
- evenBackgroundColor → Color?
-
no setterinherited
- evenForegroundColor → Color?
-
no setterinherited
- evenHoverBackgroundColor → Color?
-
no setterinherited
- foregroundColor → Color?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverBackgroundColor → Color?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedCheckboxIcon → Widget?
-
no setterinherited
- selectedColor → SelectedTileColor
-
no setterinherited
- textStyle → TextStyle?
-
no setterinherited
- trailingIcon → Widget?
-
no setterinherited
- withCheckboxIcon → bool
-
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_ListDataTileStyle value)) → TResult -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_ListDataTileStyle value)?) → TResult? -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_ListDataTileStyle value)?, {required TResult orElse()}) → TResult -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(Color? backgroundColor, Color? foregroundColor, Color? evenBackgroundColor, Color? evenForegroundColor, Color? hoverBackgroundColor, Color? evenHoverBackgroundColor, SelectedTileColor selectedColor, TextStyle? textStyle, Widget? trailingIcon, bool withCheckboxIcon, Widget? checkboxIcon, Widget? selectedCheckboxIcon)?, {required TResult orElse()}) → TResult -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(Color? backgroundColor, Color? foregroundColor, Color? evenBackgroundColor, Color? evenForegroundColor, Color? hoverBackgroundColor, Color? evenHoverBackgroundColor, SelectedTileColor selectedColor, TextStyle? textStyle, Widget? trailingIcon, bool withCheckboxIcon, Widget? checkboxIcon, Widget? selectedCheckboxIcon)) → TResult -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(Color? backgroundColor, Color? foregroundColor, Color? evenBackgroundColor, Color? evenForegroundColor, Color? hoverBackgroundColor, Color? evenHoverBackgroundColor, SelectedTileColor selectedColor, TextStyle? textStyle, Widget? trailingIcon, bool withCheckboxIcon, Widget? checkboxIcon, Widget? selectedCheckboxIcon)?) → TResult? -
Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited