of static method

Depends on the the nearest SkeletonizerConfigData if any otherwise it throws

Implementation

static SkeletonizerConfigData of(BuildContext context) {
  final scope =
      context.dependOnInheritedWidgetOfExactType<SkeletonizerConfig>();
  assert(() {
    if (scope == null) {
      throw FlutterError(
        'SkeletonizerTheme operation requested with a context that does not include a SkeletonizerTheme.\n'
        'The context used to push or pop routes from the Navigator must be that of a '
        'widget that is a descendant of a SkeletonizerTheme widget.',
      );
    }
    return true;
  }());
  return scope!.data;
}