diff --git a/lib/src/leak_data_store.dart b/lib/src/leak_data_store.dart index 50a8183479358757b53cbfe0e88181e3242a54e7..1f4e8c683c573a6c05773414d79de825f07f10e1 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