of static method

SegmentedButtonThemeData of(
  1. BuildContext context
)

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

If there is no SegmentedButtonTheme in scope, this will return ThemeData.segmentedButtonTheme from the ambient Theme.

Typical usage is as follows:

SegmentedButtonThemeData theme = SegmentedButtonTheme.of(context);

See also:

Implementation

static SegmentedButtonThemeData of(BuildContext context) {
  return maybeOf(context) ?? Theme.of(context).segmentedButtonTheme;
}