生成函数返回null。相关的引起错误的小部件是Observer

时间:2020-11-03 08:29:36

标签: android ios flutter dart mobile

return Material(
      child: Stack(
        children: <Widget>[
          Center(child: _buildContent()),
          Observer(
            builder: (context) {
              return _store.success
                  ? navigate(context)
                  : _showErrorMessage(_store.errorStore.errorMessage);
            },
          ),
          Observer(
            builder: (context) {
              return Visibility(
                visible: _store.loading,
                child: CustomProgressIndicatorWidget(),
              );
            },
          )
        ],
      ),
    );

════════小部件库捕获到异常══════════════════════════════════ ═ 生成函数返回null。 相关的引起错误的小部件是 观察者

此错误是由第一个观察者得到的,即成功函数。

0 个答案:

没有答案