of static method

ItemTileTheme of(
  1. BuildContext context
)

The closest instance of this class that encloses the given context.

Typical usage is as follows:

ListTileTheme theme = ListTileTheme.of(context);

Implementation

static ItemTileTheme of(BuildContext context) {
  final ItemTileTheme? result =
      context.dependOnInheritedWidgetOfExactType<ItemTileTheme>();
  return result ?? const ItemTileTheme(child: SizedBox());
}