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})
-
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})
-
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 - 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 - sortIconColor → Color?
-
The color of the sort icon which indicates the ascending or descending
order.
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}) → 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.