当用户点击它时,它会显示下一个屏幕,其中包含问题和答案。我为问题和答案生成创建了一个单独的类,并在其中为每个数学操作创建了方法,如下所示 class QandAgeneration{
//Perform the addition quiz generation我想我可以使用if else,通过使用带字符串参数的构造函数将字符串值从类别屏幕传递到下一个屏幕。
对于我的问题,我看到了类似的答案,例如这个,但是数据是通过一个onPressed事件传递的。如何在不发生任何onPressed或onTap事件的情况下,将数据从子部件传递给父小部件。代码 String?How can i pass the title string to the ParentWidget as passedData String
class ChildWidget exte