Selaa lähdekoodia

update: replace inheritFromWidgetOfExactType

hwh97 4 vuotta sitten
vanhempi
commit
751e0a7b05
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      lib/src/chewie_player.dart

+ 1 - 2
lib/src/chewie_player.dart

@@ -278,8 +278,7 @@ class ChewieController extends ChangeNotifier {
 
   static ChewieController of(BuildContext context) {
     final chewieControllerProvider =
-        context.inheritFromWidgetOfExactType(_ChewieControllerProvider)
-            as _ChewieControllerProvider;
+        context.findAncestorWidgetOfExactType<_ChewieControllerProvider>();
 
     return chewieControllerProvider.controller;
   }