SfDataGridThemeData class

Holds the color and typography values for a SfDataGridTheme. Use this class to configure a SfDataGridTheme widget

To obtain the current theme, use SfDataGridTheme.of.

Widget build(BuildContext context) {
  return Scaffold(
    body: SfDataGridTheme(
      data: SfDataGridThemeData(
        brightness: Brightness.dark,
      ),
      child: SfDataGrid(columns: [],
      source: _dataGridSource)
    ),
  );
}
Mixed-in types
Annotations

Constructors

SfDataGridThemeData({Color? gridLineColor, double? gridLineStrokeWidth, Color? selectionColor, DataGridCurrentCellStyle? currentCellStyle, Color? frozenPaneLineColor, double? frozenPaneLineWidth, Color? sortIconColor, Color? headerColor, Color? headerHoverColor, double? frozenPaneElevation, Color? columnResizeIndicatorColor, double? columnResizeIndicatorStrokeWidth, Color? rowHoverColor, TextStyle? rowHoverTextStyle, Widget? sortIcon, Widget? filterIcon, Color? filterIconColor, Color? filterIconHoverColor, Color? sortOrderNumberColor, Color? sortOrderNumberBackgroundColor, TextStyle? filterPopupTextStyle, TextStyle? filterPopupDisabledTextStyle, Color? columnDragIndicatorColor, double? columnDragIndicatorStrokeWidth, Widget? groupExpanderIcon, double? indentColumnWidth, Color? indentColumnColor})
Create a SfDataGridThemeData that's used to configure a SfDataGridTheme.
const
SfDataGridThemeData.raw({Brightness? brightness, Color? gridLineColor, double? gridLineStrokeWidth, Color? selectionColor, DataGridCurrentCellStyle? currentCellStyle, Color? frozenPaneLineColor, double? frozenPaneLineWidth, Color? sortIconColor, Color? headerHoverColor, Color? headerColor, double? frozenPaneElevation, Color? rowHoverColor, Color? columnResizeIndicatorColor, double? columnResizeIndicatorStrokeWidth, TextStyle? rowHoverTextStyle, Widget? sortIcon, Widget? filterIcon, Color? filterIconColor, Color? filterIconHoverColor, Color? sortOrderNumberColor, Color? sortOrderNumberBackgroundColor, TextStyle? filterPopupTextStyle, TextStyle? filterPopupDisabledTextStyle, Color? columnDragIndicatorColor, double? columnDragIndicatorStrokeWidth, Widget? groupExpanderIcon, double? indentColumnWidth, Color? indentColumnColor})
Create a SfDataGridThemeData that's used to configure a SfDataGridTheme.
factory

Properties

columnDragIndicatorColor Color?
The color of the column drag indicator.
final
columnDragIndicatorStrokeWidth double?
The stroke width of the column drag indicator.
final
columnResizeIndicatorColor Color?
The color of the line which indicates the column resizing.
final
columnResizeIndicatorStrokeWidth double?
The width of the line which indicates the column resizing.
final
currentCellStyle DataGridCurrentCellStyle?
Defines the default configuration of current cell in SfDataGrid.
final
filterIcon Widget?
The icon to indicate the filtering applied in column.
final
filterIconColor Color?
The color of the filter icon which indicates whether the column is filtered or not.
final
filterIconHoverColor Color?
The color for the filter icon when a pointer is hovering over it.
final
filterPopupDisabledTextStyle TextStyle?
The TextStyle of the disabled options in filter popup menu.
final
filterPopupTextStyle TextStyle?
The TextStyle of the options in filter popup menu except the items which are already selected.
final
frozenPaneElevation double?
The elevation of the frozen pane line.
final
frozenPaneLineColor Color?
The color of the line which indicates the frozen pane.
final
frozenPaneLineWidth double?
The width of the line which indicates the frozen pane.
final
gridLineColor Color?
The color for grid line.
final
gridLineStrokeWidth double?
The width for grid line.
final
groupExpanderIcon Widget?
This icon indicates the expand-collapse state of a group in a caption summary row.
final
hashCode int
The hash code for this object.
no setteroverride
headerColor Color?
The color for the header cells in the SfDataGrid.
final
headerHoverColor Color?
The background color of header cells when a pointer is hovering over it in SfDataGrid.
final
indentColumnColor Color?
The color of an indent column.
final
indentColumnWidth double?
The width of an indent column.
final
rowHoverColor Color?
The color for the row when a pointer is hovering over it.
final
rowHoverTextStyle TextStyle?
The default TextStyle for the row when a pointer is hovering over it.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionColor Color?
Defines the default configuration of selection in SfDataGrid.
final
sortIcon Widget?
The icon to display for sort order.
final
sortIconColor Color?
The color of the sort icon which indicates the ascending or descending order.
final
sortOrderNumberBackgroundColor Color?
The color of the rounded background displayed when the order of the sorting is shown.
final
sortOrderNumberColor Color?
The color of the number displayed when the order of the sorting is shown.
final

Methods

copyWith({Brightness? brightness, Color? gridLineColor, double? gridLineStrokeWidth, Color? selectionColor, DataGridCurrentCellStyle? currentCellStyle, double? frozenPaneLineWidth, Color? frozenPaneLineColor, Color? sortIconColor, Color? headerHoverColor, Color? headerColor, double? frozenPaneElevation, Color? columnResizeIndicatorColor, double? columnResizeIndicatorStrokeWidth, Color? rowHoverColor, TextStyle? rowHoverTextStyle, Widget? sortIcon, Widget? filterIcon, Color? filterIconColor, Color? filterIconHoverColor, Color? sortOrderNumberColor, Color? sortOrderNumberBackgroundColor, TextStyle? filterPopupTextStyle, TextStyle? filterPopupDisabledTextStyle, double? columnDragIndicatorStrokeWidth, Color? columnDragIndicatorColor, Widget? groupExpanderIcon, double indentColumnWidth = 40.0, Color? indentColumnColor}) SfDataGridThemeData
Creates a copy of this theme but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

lerp(SfDataGridThemeData? a, SfDataGridThemeData? b, double t) SfDataGridThemeData?
Linearly interpolate between two themes.