maybeOf static method

AlterDevice? maybeOf(
  1. BuildContext context
)

Retrieves the ambient AlterDevice if one is provided in the widget hierarchy.

Implementation

static AlterDevice? maybeOf(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<AlterDeviceScope>()?.device;
}