我想在每次向前/向后更改页面时应用NeverScrollableScrollPhysics(),然后在3秒后返回到AlwaysScrollableScrollPhysics()。我将如何实现这种行为?我尝试在onPageChanged监听器中设置状态,但它会破坏页面View。class_HomePageStateextendsState{ScrollPhysicsmyScrollPhysics=AlwaysScrollableScrollPhysics();@overrideWidgetbuild(BuildContextcontext){returnPageView(scrollDi
我想在每次向前/向后更改页面时应用NeverScrollableScrollPhysics(),然后在3秒后返回到AlwaysScrollableScrollPhysics()。我将如何实现这种行为?我尝试在onPageChanged监听器中设置状态,但它会破坏页面View。class_HomePageStateextendsState{ScrollPhysicsmyScrollPhysics=AlwaysScrollableScrollPhysics();@overrideWidgetbuild(BuildContextcontext){returnPageView(scrollDi
我正在尝试动态设置PageView边界。这是一个简化的示例,从第10页开始,左右边界由随机数生成器(leftEnd,rightEnd)设置。import'package:flutter/material.dart';import'dart:math';voidmain()=>runApp(newMyApp());classMyAppextendsStatelessWidget{@overrideWidgetbuild(BuildContextcontext){returnnewMaterialApp(title:'FlutterDemo',home:newMyTabbedPage(),