-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
重构模型加载逻辑,以提高效率并增强错误处理。在AI扫描页面和YOLOv8检测器中实施。更新Firebase Crashlytics集成,以记录更详细的错误信息。主入口文件中的错误记录也得到了改进。 -统一GPU委托的使用,以提高模型加载效率。 - 改进错误记录,包括堆栈跟踪,方便问题追踪。 - 删除无效的Firebase Crashlytics记录方法。 Optimization: Improve model loading and error handling Refactor the model loading logic to improve efficiency and enhance error handling. Implemented in AI scan page and YOLOv8 detector. Updated the Firebase Crashlytics integration to log more detailed error information. Error logging in the main entry file has also been improved. - Unify the use of GPU delegates to improve model loading efficiency. - Improved error logging, including stack tracing, to facilitate problem tracking. - Delete invalid Firebase Crashlytics logging methods. ```
- Loading branch information
Showing
4 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import 'package:firebase_crashlytics/firebase_crashlytics.dart'; | ||
import 'package:logger/logger.dart'; | ||
import 'package:sudoku/constant.dart'; | ||
|
||
Logger log = Logger(); | ||
|
||
class CrashlyticsUtil { | ||
static void recordError(dynamic error, dynamic stackTrace) { | ||
if (!Constant.enableGoogleFirebase) { | ||
log.w("not enable google firebase crashlytics service"); | ||
log.w(error, stackTrace: stackTrace); | ||
return; | ||
} | ||
FirebaseCrashlytics.instance.recordError(error, stackTrace); | ||
} | ||
} |