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