diff --git a/src/ui/flutter/lib/main.dart b/src/ui/flutter/lib/main.dart index 870831c6..460856c7 100644 --- a/src/ui/flutter/lib/main.dart +++ b/src/ui/flutter/lib/main.dart @@ -16,6 +16,7 @@ along with this program. If not, see . */ +import 'dart:async'; import 'dart:io'; import 'package:catcher/catcher.dart'; @@ -24,6 +25,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:path_provider/path_provider.dart'; import 'package:sanmill/generated/l10n.dart'; +import 'package:stack_trace/stack_trace.dart'; import 'services/audios.dart'; import 'services/player.dart'; @@ -103,7 +105,9 @@ class _SanmillAppState extends State { @override void initState() { super.initState(); - Player.loadProfile(); + Chain.capture(() { + Player.loadProfile(); + }); } @override diff --git a/src/ui/flutter/pubspec.yaml b/src/ui/flutter/pubspec.yaml index 53171d95..751c1242 100644 --- a/src/ui/flutter/pubspec.yaml +++ b/src/ui/flutter/pubspec.yaml @@ -20,6 +20,7 @@ dependencies: intl: ^0.16.1 flutter_socket_io: ^0.6.0 catcher: ^0.4.1 + stack_trace: ^1.9.6 dev_dependencies: flutter_test: