feat: starting of manager API work.

This commit is contained in:
Aunali321 2022-08-02 00:35:11 +05:30
parent 48a65872ea
commit d9256149e7
7 changed files with 60 additions and 3 deletions

View File

@ -1,9 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.revanced.revanced_manager_flutter">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:label="revanced_manager_flutter"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
android:icon="@mipmap/ic_launcher"
android:requestLegacyExternalStorage="true">
<activity
android:name=".MainActivity"
android:exported="true"

View File

@ -1 +1,10 @@
import 'dart:io';
import 'package:permission_handler/permission_handler.dart';
import 'package:path_provider/path_provider.dart' as p;
// use path_provider to get the path of the storage directory
void getPath() async {
final path = await p.getExternalStorageDirectory();
print(path);
}

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:revanced_manager_flutter/backend/api/manager_api.dart';
import 'package:revanced_manager_flutter/ui/widgets/available_updates_card.dart';
import 'package:revanced_manager_flutter/ui/widgets/installed_apps_card.dart';
import 'package:revanced_manager_flutter/ui/widgets/latest_commit_card.dart';
@ -23,7 +24,9 @@ class HomeScreen extends StatelessWidget {
Align(
alignment: Alignment.topRight,
child: IconButton(
onPressed: () {},
onPressed: () {
getPath();
},
icon: const Icon(
Icons.more_vert,
),

View File

@ -187,7 +187,7 @@ packages:
source: hosted
version: "1.0.0"
path_provider:
dependency: transitive
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
@ -235,6 +235,41 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "10.0.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
url: "https://pub.dartlang.org"
source: hosted
version: "10.0.0"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.4"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "3.7.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
petitparser:
dependency: transitive
description:

View File

@ -38,6 +38,8 @@ dependencies:
google_fonts: ^3.0.1
http: ^0.13.4
github: ^9.4.0
permission_handler: ^10.0.0
path_provider: ^2.0.11
dev_dependencies:
flutter_test:

View File

@ -6,6 +6,9 @@
#include "generated_plugin_registrant.h"
#include <permission_handler_windows/permission_handler_windows_plugin.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
}

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
permission_handler_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST