我有一个方法,它根据枚举的值返回两个有状态小部件中的一个。但是,即使我可以通过调试器看到“正确”的小部件正在返回,UI也只显示呈现的第一个小部件。似乎状态对象以某种方式在小部件的不同实例之间共享,或者我遗漏了什么。default:
return InfoCard("Please login with your username a
但是当我这样做的时候,它会给我这个错误:I/flutter ( 7067): Unsupported operation: Cannot add to an unmodifiable list
I/flutter ( 7067): Whenthe exception was thrown, this w