|
|
@@ -1,3 +1,5 @@
|
|
|
+import 'dart:io';
|
|
|
+
|
|
|
import 'package:classify_photo/classify_photo.dart';
|
|
|
import 'package:clean/base/base_controller.dart';
|
|
|
import 'package:clean/data/consts/constants.dart';
|
|
|
@@ -64,7 +66,10 @@ class HomeController extends BaseController {
|
|
|
Future<void> onInit() async {
|
|
|
// TODO: implement onInit
|
|
|
super.onInit();
|
|
|
- loadPhotosFromDirectory();
|
|
|
+ if (Platform.isAndroid) {
|
|
|
+ loadPhotosFromDirectory();
|
|
|
+ }
|
|
|
+
|
|
|
if (await Permission.photos.request().isGranted) {
|
|
|
PhotoManager.clearFileCache();
|
|
|
getStorageInfo();
|