问题描述
我的应用程序的$ sudo -u postgres psql <db_name>
<db_name>#= CREATE EXTENSION IF NOT EXISTS <your-extension>;
具有购物车小部件,该小部件使用徽章显示购物车中的物品数量。
当我将完全相同的购物车放入脚手架时,它会在添加或删除购物车中的物品时立即更新状态。但是在我的应用栏中,购物车小部件的状态没有得到更新。很奇怪。
AppBar
如您所见,actions: <Widget>[
Badge(
badgeContent: Text('${selectedItems.length}',style: TextStyle(color: Colors.white)),position: BadgePosition.topRight(top: 0.0,right: 5.0),badgeColor: Colors.black,showBadge: selectedItems.length == 0 ? false : true,child: IconButton(
icon: Icon(Icons.shopping_cart),onPressed: () => Navigator.push(context,CupertinoPageRoute(builder: (context) => CartScreen())),color: Colors.black,),)
],
是购物车中的物品数。
请帮帮我。现在在这里住了很长时间...
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)