From 8d070935286777e2f59d796b6ef991e217a8f860 Mon Sep 17 00:00:00 2001 From: huangxiaoyao <976125628@qq.com> Date: Fri, 16 Aug 2024 10:32:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ohos=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=9A=84=E5=88=A4=E6=96=AD=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangxiaoyao <976125628@qq.com> --- lib/src/leak_data_store.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/leak_data_store.dart b/lib/src/leak_data_store.dart index 50a8183..ea19bc6 100644 --- a/lib/src/leak_data_store.dart +++ b/lib/src/leak_data_store.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'package:leak_detector/src/leak_sqlite_store.dart'; import '../leak_detector.dart'; +import 'package:flutter/foundation.dart'; ///Leaked record store. abstract class LeakedRecordStore { @@ -14,7 +15,7 @@ abstract class LeakedRecordStore { //TODO add windows, linux data store. factory LeakedRecordStore() { if (_instance == null) { - if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS || Platform.isOhos) { + if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS || defaultTargetPlatform == TargetPlatform.ohos) { _instance = LeakedRecordSQLiteStore(); } else if (Platform.isWindows) { //TODO windows store -- Gitee