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({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})
-
Create a SfDataGridThemeData that's used to configure a
SfDataGridTheme.
factory
- SfDataGridThemeData.raw({required Brightness? brightness, required Color? gridLineColor, required double? gridLineStrokeWidth, required Color? selectionColor, required DataGridCurrentCellStyle? currentCellStyle, required Color? frozenPaneLineColor, required double? frozenPaneLineWidth, required Color? sortIconColor, required Color? headerColor, required Color? headerHoverColor, required double? frozenPaneElevation, required Color? columnResizeIndicatorColor, required double? columnResizeIndicatorStrokeWidth, required Color? rowHoverColor, required TextStyle? rowHoverTextStyle, required Widget? sortIcon, required Widget? filterIcon, required Color? filterIconColor, required Color? filterIconHoverColor, required Color? sortOrderNumberColor, required Color? sortOrderNumberBackgroundColor, required TextStyle? filterPopupTextStyle, required TextStyle? filterPopupDisabledTextStyle})
-
Create a SfDataGridThemeData given a set of exact values.
All the values must be specified.
const
Properties
- brightness → Brightness?
-
The brightness of the overall theme of the
application for the
SfDataGrid
widgets.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
- 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 - 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}) → 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.