maybeOf static method

PreviewFrameData? maybeOf(
  1. BuildContext context
)

The nearest frame's data, or null outside any preview frame.

Implementation

static PreviewFrameData? maybeOf(BuildContext context) =>
    context.dependOnInheritedWidgetOfExactType<_PreviewScope>()?.data;