of method

IconThemeData of (BuildContext context)

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

Defaults to the current ThemeData.iconTheme.

Typical usage is as follows:

IconThemeData theme = IconTheme.of(context);

Implementation

static IconThemeData of(BuildContext context) {
  final IconThemeData iconThemeData = _getInheritedIconThemeData(context);
  return iconThemeData.isConcrete ? iconThemeData : const IconThemeData.fallback().merge(iconThemeData);
}