of<C extends Cube> static method
Use to get Cube registered in de Widget tree.
Implementation
static C? of<C extends Cube>(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<CubeProvider<C>>()?.cube;
}