of static method

Finds YoutubePlayerController in the provided context.

Implementation

static YoutubePlayerController? of(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<InheritedYoutubePlayer>()
      ?.controller;
}