of static method

Implementation

static ResponsiveBreakpointsData of(BuildContext context) {
  final InheritedResponsiveBreakpoints? data = context
      .dependOnInheritedWidgetOfExactType<InheritedResponsiveBreakpoints>();
  if (data != null) return data.data;
  throw FlutterError.fromParts(
    <DiagnosticsNode>[
      ErrorSummary(
          'ResponsiveBreakpoints.of() called with a context that does not contain ResponsiveBreakpoints.'),
      ErrorDescription(
          'No Responsive ancestor could be found starting from the context that was passed '
          'to ResponsiveBreakpoints.of(). Place a ResponsiveBreakpoints at the root of the app '
          'or supply a ResponsiveBreakpoints.builder.'),
      context.describeElement('The context used was')
    ],
  );
}