pub struct DataTableThemeData {Show 16 fields
pub decoration: Option<DecorationRef>,
pub data_row_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub data_row_min_height: Option<f64>,
pub data_row_max_height: Option<f64>,
pub data_text_style: Option<TextStyle>,
pub heading_row_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub heading_row_height: Option<f64>,
pub heading_text_style: Option<TextStyle>,
pub horizontal_margin: Option<f64>,
pub column_spacing: Option<f64>,
pub divider_thickness: Option<f64>,
pub checkbox_horizontal_margin: Option<f64>,
pub heading_cell_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub data_row_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub heading_row_alignment: Option<MainAxisAlignment>,
pub sort_icon_builder: Option<DataTableSortIconBuilder>,
}Expand description
Defines default property values for descendant DataTable widgets.
Descendant widgets obtain the current DataTableThemeData object using
DataTableTheme::of. Instances of DataTableThemeData can be customized with
DataTableThemeData::copy_with.
Typically a DataTableThemeData is specified as part of the overall Theme with
ThemeData::data_table_theme.
All DataTableThemeData properties are None by default. When null, the DataTable
provides its own defaults.
See also:
DataTable, which uses this to style itself.ThemeData, which describes the overall theme information for the application.
Fields§
§decoration: Option<DecorationRef>The background and borders of the table used by a DataTable widget.
The DataTable stacks this decoration with the Material it is rendered in.
data_row_color: Option<WidgetStatePropertyRef<Option<Color>>>The background color of the table’s rows.
If None, DataTable uses ThemeData::data_table_theme’s default instead.
data_row_min_height: Option<f64>The height of each row (excluding the row that contains column headings).
Dart’s dataRowMinHeight; None lets DataTable default it.
data_row_max_height: Option<f64>The maximum height of each row (excluding the row that contains column headings).
data_text_style: Option<TextStyle>The text style for data rows.
heading_row_color: Option<WidgetStatePropertyRef<Option<Color>>>The background color of the heading row.
heading_row_height: Option<f64>The height of the heading row.
heading_text_style: Option<TextStyle>The text style for the heading row.
horizontal_margin: Option<f64>The horizontal margin between the edges of the table and the content in the first and last cells of each row.
column_spacing: Option<f64>The horizontal margin between the contents of each data column.
divider_thickness: Option<f64>The thickness of the divider between rows.
checkbox_horizontal_margin: Option<f64>Horizontal margin around the checkbox, if it is displayed.
heading_cell_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>If specified, overrides the default value of DataColumn::mouse_cursor.
data_row_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>If specified, overrides the default value of DataRow::mouse_cursor.
heading_row_alignment: Option<MainAxisAlignment>If specified, overrides the default value of DataTable::heading_row_alignment.
sort_icon_builder: Option<DataTableSortIconBuilder>If specified, overrides the default value of DataTable::sort_icon_builder.
Implementations§
Source§impl DataTableThemeData
impl DataTableThemeData
Sourcepub fn new() -> DataTableThemeData
pub fn new() -> DataTableThemeData
Creates a theme that can be used for ThemeData::data_table_theme and
DataTableTheme; Dart’s optional named arguments are the fluent setters.
Sourcepub fn decoration(
self,
decoration: impl Into<DecorationRef>,
) -> DataTableThemeData
pub fn decoration( self, decoration: impl Into<DecorationRef>, ) -> DataTableThemeData
Dart DataTableThemeData(decoration:).
Sourcepub fn data_row_color(
self,
data_row_color: WidgetStatePropertyRef<Option<Color>>,
) -> DataTableThemeData
pub fn data_row_color( self, data_row_color: WidgetStatePropertyRef<Option<Color>>, ) -> DataTableThemeData
Dart DataTableThemeData(dataRowColor:).
Sourcepub fn data_row_height(self, data_row_height: f64) -> DataTableThemeData
👎Deprecated: Migrate to use data_row_min_height and data_row_max_height instead. This feature was deprecated after v3.7.0-5.0.pre.
pub fn data_row_height(self, data_row_height: f64) -> DataTableThemeData
Migrate to use data_row_min_height and data_row_max_height instead. This feature was deprecated after v3.7.0-5.0.pre.
Dart’s deprecated DataTableThemeData(dataRowHeight:): it sets
data_row_min_height and
data_row_max_height to one value.
Dart asserts that the argument is not given with either of them in one call; a fluent chain has no call to compare, so a later setter replaces what an earlier one wrote.
Sourcepub fn data_row_min_height(self, data_row_min_height: f64) -> DataTableThemeData
pub fn data_row_min_height(self, data_row_min_height: f64) -> DataTableThemeData
Dart DataTableThemeData(dataRowMinHeight:).
Sourcepub fn data_row_max_height(self, data_row_max_height: f64) -> DataTableThemeData
pub fn data_row_max_height(self, data_row_max_height: f64) -> DataTableThemeData
Dart DataTableThemeData(dataRowMaxHeight:).
Sourcepub fn data_text_style(self, data_text_style: TextStyle) -> DataTableThemeData
pub fn data_text_style(self, data_text_style: TextStyle) -> DataTableThemeData
Dart DataTableThemeData(dataTextStyle:).
Sourcepub fn heading_row_color(
self,
heading_row_color: WidgetStatePropertyRef<Option<Color>>,
) -> DataTableThemeData
pub fn heading_row_color( self, heading_row_color: WidgetStatePropertyRef<Option<Color>>, ) -> DataTableThemeData
Dart DataTableThemeData(headingRowColor:).
Sourcepub fn heading_row_height(self, heading_row_height: f64) -> DataTableThemeData
pub fn heading_row_height(self, heading_row_height: f64) -> DataTableThemeData
Dart DataTableThemeData(headingRowHeight:).
Sourcepub fn heading_text_style(
self,
heading_text_style: TextStyle,
) -> DataTableThemeData
pub fn heading_text_style( self, heading_text_style: TextStyle, ) -> DataTableThemeData
Dart DataTableThemeData(headingTextStyle:).
Sourcepub fn horizontal_margin(self, horizontal_margin: f64) -> DataTableThemeData
pub fn horizontal_margin(self, horizontal_margin: f64) -> DataTableThemeData
Dart DataTableThemeData(horizontalMargin:).
Sourcepub fn column_spacing(self, column_spacing: f64) -> DataTableThemeData
pub fn column_spacing(self, column_spacing: f64) -> DataTableThemeData
Dart DataTableThemeData(columnSpacing:).
Sourcepub fn divider_thickness(self, divider_thickness: f64) -> DataTableThemeData
pub fn divider_thickness(self, divider_thickness: f64) -> DataTableThemeData
Dart DataTableThemeData(dividerThickness:).
Sourcepub fn checkbox_horizontal_margin(
self,
checkbox_horizontal_margin: f64,
) -> DataTableThemeData
pub fn checkbox_horizontal_margin( self, checkbox_horizontal_margin: f64, ) -> DataTableThemeData
Dart DataTableThemeData(checkboxHorizontalMargin:).
Sourcepub fn heading_cell_cursor(
self,
heading_cell_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> DataTableThemeData
pub fn heading_cell_cursor( self, heading_cell_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> DataTableThemeData
Dart DataTableThemeData(headingCellCursor:).
Sourcepub fn data_row_cursor(
self,
data_row_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> DataTableThemeData
pub fn data_row_cursor( self, data_row_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> DataTableThemeData
Dart DataTableThemeData(dataRowCursor:).
Sourcepub fn heading_row_alignment(
self,
heading_row_alignment: MainAxisAlignment,
) -> DataTableThemeData
pub fn heading_row_alignment( self, heading_row_alignment: MainAxisAlignment, ) -> DataTableThemeData
Dart DataTableThemeData(headingRowAlignment:).
Sourcepub fn sort_icon_builder(
self,
sort_icon_builder: impl Fn(&mut App, BuildContext, bool, bool) -> WidgetRef + 'static,
) -> DataTableThemeData
pub fn sort_icon_builder( self, sort_icon_builder: impl Fn(&mut App, BuildContext, bool, bool) -> WidgetRef + 'static, ) -> DataTableThemeData
Dart DataTableThemeData(sortIconBuilder:).
Sourcepub fn data_row_height_value(&self) -> Option<f64>
👎Deprecated: Migrate to use data_row_min_height and data_row_max_height instead. This feature was deprecated after v3.7.0-5.0.pre.
pub fn data_row_height_value(&self) -> Option<f64>
Migrate to use data_row_min_height and data_row_max_height instead. This feature was deprecated after v3.7.0-5.0.pre.
Dart’s deprecated dataRowHeight getter: the row height, if the minimum and the
maximum are the same.
Sourcepub fn copy_with(&self) -> DataTableThemeData
pub fn copy_with(&self) -> DataTableThemeData
Creates a copy of this object but with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().divider_thickness(2.0)); the deprecated dataRowHeight argument
is data_row_height, which replaces both heights.
Sourcepub fn lerp(
a: &DataTableThemeData,
b: &DataTableThemeData,
t: f64,
) -> DataTableThemeData
pub fn lerp( a: &DataTableThemeData, b: &DataTableThemeData, t: f64, ) -> DataTableThemeData
Linearly interpolates between two DataTableThemeData.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for DataTableThemeData
impl Clone for DataTableThemeData
Source§impl Debug for DataTableThemeData
impl Debug for DataTableThemeData
Source§impl Default for DataTableThemeData
impl Default for DataTableThemeData
Source§impl Diagnosticable for DataTableThemeData
impl Diagnosticable for DataTableThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).