of method Null safety

ProgressIndicatorThemeData of(
  1. BuildContext context
)

Returns the data from the closest ProgressIndicatorTheme ancestor. If there is no ancestor, it returns ThemeData.progressIndicatorTheme.

Typical usage is as follows:

ProgressIndicatorThemeData theme = ProgressIndicatorTheme.of(context);

Implementation

static ProgressIndicatorThemeData of(BuildContext context) {
  final ProgressIndicatorTheme? progressIndicatorTheme = context.dependOnInheritedWidgetOfExactType<ProgressIndicatorTheme>();
  return progressIndicatorTheme?.data ?? Theme.of(context).progressIndicatorTheme;
}