Add stacktrace to main error screen (#582)

mkyq committed Oct 31, 2022 at 12:38 UTC 03d6701bb728e6655bcc5063a0c1420b6517407e
1 file changed +2 -2
lib/main.dart
+2 -2
@@ -130,7 +130,7 @@ Future<void> main() async {
130 secureStorage: secureStorage,
131 initialMigrationVersion: 17);
132 runApp(App());
133 - } catch (e) {
133 + } catch (e, stacktrace) {
134 runApp(MaterialApp(
135 debugShowCheckedModeBanner: true,
136 home: Scaffold(
@@ -138,7 +138,7 @@ Future<void> main() async {
138 margin:
139 EdgeInsets.only(top: 50, left: 20, right: 20, bottom: 20),
140 child: Text(
141 - 'Error:\n${e.toString()}',
141 + 'Error:\n${e.toString()}\nStacktrace: $stacktrace',
142 style: TextStyle(fontSize: 22),
143 )))));
144 }