of static method

Returns ResponsiveBreakpointProviderScope from context and depend on it.

Implementation

static ResponsiveBreakpointProviderScope of(BuildContext context) {
  final data = context.dependOnInheritedWidgetOfExactType<ResponsiveBreakpointProviderScope>();
  if (data == null) {
    throw Exception("Could not find inherited widget of type ResponsiveBreakpointProviderData");
  }

  return data;
}