Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

视频没有做缓存,每次切换都会初始化 #1

Open
TransFormes opened this issue May 18, 2021 · 2 comments
Open

视频没有做缓存,每次切换都会初始化 #1

TransFormes opened this issue May 18, 2021 · 2 comments

Comments

@TransFormes
Copy link

底部栏切换会导致首页销毁,视频实例也都销毁,在切换回来又初始化,假如是网络资源会更慢

@zhangqi444
Copy link

You could update the getBody() method in main_page.dart file as below.

IndexedStack(
        index: _mainPageController.indexBottomBarMainPage.value,
        children: [
          HomePage(pageController: _scrollPageController),
          SearchPage(),
          MessagePage(),
          UserPage(
            pageController: _scrollPageController,
            isLoginUser: true,
            userModel: loginUserModel
          ),
        ],
      ),

@799837663
Copy link

这样就可以缓存了嘛?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants