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:

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.
const
factory
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

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_ListDataTileStyle value)?) → TResult?

Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_ListDataTileStyle value)?, {required TResult orElse()}) → TResult

Available on ListDataTileStyle, provided by the ListDataTileStylePatterns extension

A variant of map that fallback to returning orElse.
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 of when that fallback to an orElse callback.
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

A switch-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 of when that fallback to returning null

Operators

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