of static method

DesignHaptics of(
  1. BuildContext context
)

The table in force at context: the nearest DesignHapticsScope's, else the platform's own (const DesignHaptics()).

Implementation

static DesignHaptics of(BuildContext context) =>
    context
        .dependOnInheritedWidgetOfExactType<DesignHapticsScope>()
        ?.haptics ??
    const DesignHaptics();