SfThemeData class
Holds the color and typography values for light and dark themes. Use this class to configure a SfTheme widget.
To obtain the current theme, use SfTheme.of.
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SfTheme(
data: SfThemeData(
chartThemeData: SfChartThemeData(
backgroundColor: Colors.grey,
brightness: Brightness.dark
)
),
child: SfCartesianChart(
)
),
)
);
}
- Mixed-in types
- Annotations
Constructors
- SfThemeData({Brightness? brightness, SfPdfViewerThemeData? pdfViewerThemeData, SfChartThemeData? chartThemeData, SfCalendarThemeData? calendarThemeData, SfDataGridThemeData? dataGridThemeData, SfDataPagerThemeData? dataPagerThemeData, SfDateRangePickerThemeData? dateRangePickerThemeData, SfBarcodeThemeData? barcodeThemeData, SfGaugeThemeData? gaugeThemeData, SfSliderThemeData? sliderThemeData, SfRangeSliderThemeData? rangeSliderThemeData, SfRangeSelectorThemeData? rangeSelectorThemeData, SfMapsThemeData? mapsThemeData})
-
Creating an argument constructor of SfThemeData class.
factory
- SfThemeData.dark()
-
This method is used to return the dark theme.
factory
- SfThemeData.fallback()
-
The default color theme. Same as SfThemeData.light.
factory
- SfThemeData.light()
-
This method returns the light theme when no theme has been specified.
factory
- SfThemeData.raw({required Brightness brightness, required SfPdfViewerThemeData pdfViewerThemeData, required SfChartThemeData chartThemeData, required SfCalendarThemeData calendarThemeData, required SfDataGridThemeData dataGridThemeData, required SfDateRangePickerThemeData dateRangePickerThemeData, required SfBarcodeThemeData barcodeThemeData, required SfGaugeThemeData gaugeThemeData, required SfSliderThemeData sliderThemeData, required SfRangeSelectorThemeData rangeSelectorThemeData, required SfRangeSliderThemeData rangeSliderThemeData, required SfMapsThemeData mapsThemeData, required SfDataPagerThemeData dataPagerThemeData})
-
Create a SfThemeData given a set of exact values. All the values must be
specified.
const
Properties
- barcodeThemeData → SfBarcodeThemeData
-
Defines the default configuration of barcode widgets.
final
- brightness → Brightness
-
The brightness of the overall theme of the
application for the Syncusion widgets.
final
- calendarThemeData → SfCalendarThemeData
-
Defines the default configuration of calendar widgets.
final
- chartThemeData → SfChartThemeData
-
Defines the default configuration of chart widgets.
final
- dataGridThemeData → SfDataGridThemeData
-
Defines the default configuration of datagrid widgets.
final
- dataPagerThemeData → SfDataPagerThemeData
-
ToDO
final
- dateRangePickerThemeData → SfDateRangePickerThemeData
-
Defines the default configuration of datepicker widgets.
final
- gaugeThemeData → SfGaugeThemeData
-
Defines the default configuration of gauge widgets.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mapsThemeData → SfMapsThemeData
-
Defines the default configuration of maps widgets.
final
- pdfViewerThemeData → SfPdfViewerThemeData
-
Defines the default configuration of
SfPdfViewer
widgets.final - rangeSelectorThemeData → SfRangeSelectorThemeData
-
Defines the default configuration of range selector widgets.
final
- rangeSliderThemeData → SfRangeSliderThemeData
-
Defines the default configuration of range slider widgets.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sliderThemeData → SfSliderThemeData
-
Defines the default configuration of slider widgets.
final
Methods
-
copyWith(
{Brightness? brightness, SfPdfViewerThemeData? pdfViewerThemeData, SfChartThemeData? chartThemeData, SfCalendarThemeData? calendarThemeData, SfDataGridThemeData? dataGridThemeData, SfDateRangePickerThemeData? dateRangePickerThemeData, SfBarcodeThemeData? barcodeThemeData, SfGaugeThemeData? gaugeThemeData, SfSliderThemeData? sliderThemeData, SfRangeSelectorThemeData? rangeSelectorThemeData, SfRangeSliderThemeData? rangeSliderThemeData, SfMapsThemeData? mapsThemeData, SfDataPagerThemeData? dataPagerThemeData}) → SfThemeData - 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(
SfThemeData? a, SfThemeData? b, double t) → SfThemeData - Linearly interpolate between two themes.