我试图根据范围模型的值使用if else条件显示Widget或Snackbar。我收到错误消息:This Scaffold widget cannot be marked as needing to build because the framework is already in the
I/flutter (15840): process of building widgets.
所以我试图编写一个函数,该函数将在Scaffold的加载完成后被调用,并且在内部它将检查条件并显示SnackBar。我找不到任何解决方案。