TF-248 Ignore all plugin not supported web
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:path_provider/path_provider.dart' as pathProvider;
|
||||
import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_cache.dart';
|
||||
@@ -20,9 +21,10 @@ class HiveCacheConfig {
|
||||
if (databasePath != null) {
|
||||
Hive.init(databasePath);
|
||||
} else {
|
||||
Directory directory = await pathProvider
|
||||
.getApplicationDocumentsDirectory();
|
||||
Hive.init(directory.path);
|
||||
if (!GetPlatform.isWeb) {
|
||||
Directory directory = await pathProvider.getApplicationDocumentsDirectory();
|
||||
Hive.init(directory.path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ class HomeController extends GetxController {
|
||||
@override
|
||||
void onReady() {
|
||||
super.onReady();
|
||||
_initFlutterDownloader();
|
||||
if (!GetPlatform.isWeb) {
|
||||
_initFlutterDownloader();
|
||||
}
|
||||
_cleanupEmailCache();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user