of<C extends Cube> static method

C? of<C extends Cube>(
  1. BuildContext context
)

Used to return Cube that was provided

Implementation

static C? of<C extends Cube>(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<CubeProvider<C>>()?.cube;
}