of static method

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

If there is no enclosing ChoiceChipTheme widget, then FilterListThemeData.choiceChipTheme is used.

Typical usage is as follows:

final theme = ChoiceChipThemeData.of(context);

Implementation

static ChoiceChipThemeData of(BuildContext context) {
  final choiceChipTheme =
      context.dependOnInheritedWidgetOfExactType<ChoiceChipTheme>();
  return choiceChipTheme?.data ?? FilterListTheme.of(context).choiceChipTheme;
}