假设我的PageView中有4个孩子 PageView(
children: <Widget>[
Page1(),
Page2(),
Page3(), // how to skip this when a condition is false
Page4(),
],
) 当一个bool值为true时,我想显示Page3,我该怎么做,我想放一个null,但是我不被允许这样做。
我有一个自定义的带有页面PageView的BottomAppBar。当用户单击BottomAppBar中的项目时,我正在尝试更改页面。我正在使用Provider来管理全局状态。单击items会触发provider中的值更改,但PageView中没有在值更改时触发页面更改的方法。我如何才能做到这一点?下面是我的代码。
我的提供商:
class CurrentPage extends ChangeNotifier {
int _currentPage = 0;
int get currentPage => _currentPage;
setCurrentPage(int val
这是我的密码:
public class StoreController:Controller
{
public ActionResult Index()
{
var page=new PageHelper<Store>();
return page.PageView(this);
}
}
public class PageHelper<T>
{
public List<T>DataSou