mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat: Request root and install permissions as soon as possible
This commit is contained in:
parent
598f7571de
commit
9f3a30d9f2
@ -1,7 +1,11 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
import 'package:app_installer/app_installer.dart';
|
||||
import 'package:device_apps/device_apps.dart';
|
||||
import 'package:dynamic_themes/dynamic_themes.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:injectable/injectable.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:revanced_manager/services/root_api.dart';
|
||||
import 'package:revanced_manager/ui/views/home/home_view.dart';
|
||||
import 'package:revanced_manager/ui/views/patcher/patcher_view.dart';
|
||||
import 'package:revanced_manager/ui/views/settings/settings_view.dart';
|
||||
@ -21,6 +25,8 @@ class NavigationViewModel extends IndexTrackingViewModel {
|
||||
DynamicTheme.of(context)!.setTheme(1);
|
||||
}
|
||||
}
|
||||
RootAPI().hasRootPermissions();
|
||||
Permission.requestInstallPackages.request();
|
||||
}
|
||||
|
||||
Widget getViewForIndex(int index) {
|
||||
|
@ -49,6 +49,7 @@ dependencies:
|
||||
ref: feature/nullSafe
|
||||
package_info_plus: ^1.4.3+1
|
||||
path_provider: ^2.0.11
|
||||
permission_handler: ^10.0.0
|
||||
pull_to_refresh: ^2.0.0
|
||||
root: ^2.0.2
|
||||
share_extend: ^2.0.0
|
||||
|
Loading…
Reference in New Issue
Block a user