of static method

Get BetterPlayerController from context. Used in InheritedWidget.

Implementation

static BetterPlayerController of(BuildContext context) {
  final betterPLayerControllerProvider = context
      .dependOnInheritedWidgetOfExactType<BetterPlayerControllerProvider>()!;

  return betterPLayerControllerProvider.controller;
}