void main() { /// 自定义报错页面 if (kReleaseMode) { ErrorWidget.builder = (FlutterErrorDetails flutterErrorDetails) { debugPrint(flutterErrorDetails.toString()); return Material( child: Center( child: Text( "发生了没有处理的错误\n请通知开发者", textAlign: TextAlign.center, )), ); }; } runApp(MyApp()); }
flutter自定义报错页面
最新推荐文章于 2023-07-14 21:53:02 发布