如何解决bulderFunctions 的 openContainer 之上的提供者
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 举报,一经查实,本站将立刻删除。