-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
我在弹窗中使用TextField时遇到了错误 #53
Comments
这是我的环境: [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) 版本号为 oktoast: 2.3.1+1
|
It is not recommended to include TextField in OKToast, because TextField requires MediaQuery Material, Overlay, etc. as the parent widget. |
Yes, I understand this. But I think the use of TextField in Layer is a very common requirement. Although I use Stack to overlay on my page to meet my needs. But I still hope that oktoast can support this scenario, otherwise Point out this risk point in the introduction. |
Replace OKToast(
/// set toast style, optional
child:MaterialApp()
); to MaterialApp(builder: (context, widget) {
return OKToast(
child: widget,
);
}); |
And you just use showToastWidget(
Material(
child:TextField(),
handleTouch: true,
); |
这是我的错误日志:
看起来像是TextField组件需要有一个MaterialApp的祖先组件;
然而 我在使用OKToast的时候:
OKToast是包裹着MaterialApp的, 看起来使得TextField没有MaterialApp作为其祖先 ;导致了错误.
请问有什么解决方案么?
The text was updated successfully, but these errors were encountered: