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