Flutter——常见报错处理

1.RepositoryProvider.of() called with a context that does not contain a repository of type VideoCourseListNewRepository.

        No ancestor could be found starting from the context that was passed to RepositoryProvider.of<VideoCourseListNewRepository>().

        This can happen if the context you used comes from a widget above the RepositoryProvider.

        The context used was: MainTabDiscovery(dirty)

未初始化,需要在main.dart中初始化

原文地址:https://www.cnblogs.com/liuzhi20101016/p/13952782.html