Fix modified exception_handler.dart

This commit is contained in:
OmarHatem 2024-05-02 18:07:54 +03:00
parent bc1cfc5fe9
commit 0510cee83d

View file

@ -11,7 +11,6 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_mailer/flutter_mailer.dart';
import 'package:cake_wallet/utils/package_info.dart';
import 'package:path_provider/path_provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
class ExceptionHandler {
@ -21,7 +20,7 @@ class ExceptionHandler {
static void _saveException(String? error, StackTrace? stackTrace, {String? library}) async {
if (_file == null) {
final appDocDir = await getApplicationDocumentsDirectory();
final appDocDir = await getAppDir();
_file = File('${appDocDir.path}/error.txt');
}
@ -53,6 +52,7 @@ class ExceptionHandler {
static void _sendExceptionFile() async {
try {
if (_file == null) {
final appDocDir = await getAppDir();
_file = File('${appDocDir.path}/error.txt');