of method Null safety

SfDataGridThemeData of(
  1. BuildContext context
)

The data from the closest SfDataGridTheme instance that encloses the given context.

Defaults to SfThemeData.dataGridThemeData if there is no SfDataGridTheme in the given build context.

Implementation

static SfDataGridThemeData of(BuildContext context) {
  final SfDataGridTheme? sfDataGridTheme =
      context.dependOnInheritedWidgetOfExactType<SfDataGridTheme>();
  return sfDataGridTheme?.data ?? SfTheme.of(context).dataGridThemeData;
}