Development process will always run into a page fault occurs, this time the entire page is red,
as follows
Testing phase even if such a problem, if a formal environment will also appear this discord. So there ErrorWidget. This is to set it at the bottom of this page you can shield a.
code show as below:
void setCustomErrorPage() { ErrorWidget.builder = (FlutterErrorDetails flutterErrorDetails) { print(flutterErrorDetails.toString()); return Container( color: Colors.white, child: Center( child: Image.asset('images/timg-2.jpeg'), ), ); }; }
The introduction of the following
void main() { setCustomErrorPage(); }
When an error occurs will show the following page
over ------------------------