feat(debug): Удалить Talker (#2)

Co-authored-by: petrovyuri <y.petrov@friflex.com>
This commit is contained in:
Yuri Petrov
2025-02-04 10:18:41 +03:00
committed by GitHub
parent 40fc2209a4
commit 933c1a0f0f
17 changed files with 165 additions and 378 deletions

View File

@@ -5,16 +5,24 @@ void _initErrorHandlers(IDebugService debugService) {
// Обработка ошибок в приложении
FlutterError.onError = (details) {
_showErrorScreen();
debugService.handleError(details.exception, details.stack,
'FlutterError.onError: ${details.exceptionAsString()}',);
debugService.logError(
() => 'FlutterError.onError: ${details.exceptionAsString()}',
error: details.exception,
stackTrace: details.stack,
);
};
// Обработка асинхронных ошибок в приложении
PlatformDispatcher.instance.onError = (error, stack) {
_showErrorScreen();
debugService.handleError(error, stack, 'PlatformDispatcher: $error');
debugService.logError(
() => 'PlatformDispatcher.instance.onError',
error: error,
stackTrace: stack,
);
return true;
};
}
/// Метод для показа экрана ошибки
void _showErrorScreen() {
WidgetsBinding.instance.addPostFrameCallback((_) {