of static method

Returns the settings from the nearest DefaultButtonSettings ancestor, or null if none exists.

Implementation

static LiquidGlassSettings? of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<DefaultButtonSettings>()
      ?.settings;
}