问题描述
ChangeNotifierProvider(
create: (context) => BuyValuableNotifier(),child: OpenContainer(
closedBuilder: (context,action) {
return Container();
},openBuilder: (context,action) {
return SingleWidget();
},),
所以我在调用 openBuilder 时出现这个错误: 错误:无法在此 SingleWidget 小部件上方找到正确的提供程序
OpenContainer(
closedBuilder: (context,action) {
return Container();
},action) {
return ChangeNotifierProvider(
create: (context) => BuyValuableNotifier(),child: SingleWidget();
},
如果我这样做我会在 openBuilder 关闭时丢失数据 我该怎么办?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)