From 4ce0b6e76d9d7874104b939e09b8d1dfbb0106e3 Mon Sep 17 00:00:00 2001 From: zhuzhengjun Date: Fri, 16 Aug 2024 10:56:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E6=89=BE?= =?UTF-8?q?=E4=B8=8D=E5=88=B0Platform.isOhos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuzhengjun --- lib/src/leak_data_store.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/leak_data_store.dart b/lib/src/leak_data_store.dart index 50a8183..1f4e8c6 100644 --- a/lib/src/leak_data_store.dart +++ b/lib/src/leak_data_store.dart @@ -2,7 +2,7 @@ // is governed by a BSD-style license that can be found in the LICENSE file. import 'dart:io'; - +import 'package:flutter/foundation.dart'; import 'package:leak_detector/src/leak_sqlite_store.dart'; import '../leak_detector.dart'; @@ -14,7 +14,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