Flutter: Use custom ErrorWidget

前端 未结 2 1139
-上瘾入骨i
-上瘾入骨i 2021-01-21 07:17

Is there a way to display (in production) a custom error widget instead of the red screen of death? I will not change the framework code, plus even though we are trying to progr

2条回答
  •  心在旅途
    2021-01-21 07:52

    It is possible to change the default error rendering by changing ErrorWidget.builder

    ErrorWidget.builder = (errorDetails) {
      return Container(color: Colors.red);
    }
    

提交回复
热议问题