mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-23 11:11:03 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a346f8857f | ||
|
|
e12532ea4c | ||
|
|
7ecf951bfb | ||
|
|
db18874ea1 | ||
|
|
18a69776cd | ||
|
|
21cadf6450 | ||
|
|
5ddbe6e252 | ||
|
|
6d1427e01e | ||
|
|
6ac901f1d6 | ||
|
|
587ba795bb | ||
|
|
6b66c7bbd0 | ||
|
|
f398b6863a | ||
|
|
4d82ff3011 | ||
|
|
2a0ea78d7f | ||
|
|
4722880647 | ||
|
|
32fabcfa3f | ||
|
|
e0c46e4268 | ||
|
|
d84230fa22 | ||
|
|
9561153bfb |
@@ -71,7 +71,7 @@ dependencies {
|
|||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
|
|
||||||
// ReVanced
|
// ReVanced
|
||||||
implementation "app.revanced:revanced-patcher:5.0.1"
|
implementation "app.revanced:revanced-patcher:5.1.0"
|
||||||
|
|
||||||
// Signing & aligning
|
// Signing & aligning
|
||||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||||
|
|||||||
Binary file not shown.
BIN
android/app/src/main/jniLibs/arm64-v8a/libaapt2.so
Normal file
BIN
android/app/src/main/jniLibs/arm64-v8a/libaapt2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
android/app/src/main/jniLibs/armeabi-v7a/libaapt2.so
Normal file
BIN
android/app/src/main/jniLibs/armeabi-v7a/libaapt2.so
Normal file
Binary file not shown.
Binary file not shown.
BIN
android/app/src/main/jniLibs/x86_64/libaapt2.so
Normal file
BIN
android/app/src/main/jniLibs/x86_64/libaapt2.so
Normal file
Binary file not shown.
Binary file not shown.
@@ -115,8 +115,8 @@
|
|||||||
"frenchOption": "French",
|
"frenchOption": "French",
|
||||||
"sourcesLabel": "Sources",
|
"sourcesLabel": "Sources",
|
||||||
"sourcesLabelHint": "Configure your custom sources",
|
"sourcesLabelHint": "Configure your custom sources",
|
||||||
"orgPatchesLabel" : "Patches Organization",
|
"orgPatchesLabel": "Patches Organization",
|
||||||
"sourcesPatchesLabel" : "Patches Source",
|
"sourcesPatchesLabel": "Patches Source",
|
||||||
"orgIntegrationsLabel": "Integrations Organization",
|
"orgIntegrationsLabel": "Integrations Organization",
|
||||||
"sourcesIntegrationsLabel": "Integrations Source",
|
"sourcesIntegrationsLabel": "Integrations Source",
|
||||||
"sourcesResetDialogTitle": "Reset",
|
"sourcesResetDialogTitle": "Reset",
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
files:
|
files:
|
||||||
- source: /assets/i18n/en.json
|
- source: /assets/i18n/en.json
|
||||||
translation: /assets/i18n/%two_letters_code%.json
|
translation: /assets/i18n/%locale_with_underscore%.json
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class MyApp extends StatelessWidget {
|
|||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
FlutterI18nDelegate(
|
FlutterI18nDelegate(
|
||||||
translationLoader: FileTranslationLoader(
|
translationLoader: FileTranslationLoader(
|
||||||
fallbackFile: 'en',
|
fallbackFile: 'en_US',
|
||||||
basePath: 'assets/i18n',
|
basePath: 'assets/i18n',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -87,10 +87,21 @@ class PatcherAPI {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool dependencyNeedsIntegrations(String name) {
|
||||||
|
return name.contains('integrations') ||
|
||||||
|
_patches.any(
|
||||||
|
(patch) =>
|
||||||
|
patch.name == name &&
|
||||||
|
(patch.dependencies.any(
|
||||||
|
(dep) => dependencyNeedsIntegrations(dep),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Future<bool> needsIntegrations(List<Patch> selectedPatches) async {
|
Future<bool> needsIntegrations(List<Patch> selectedPatches) async {
|
||||||
return selectedPatches.any(
|
return selectedPatches.any(
|
||||||
(patch) => patch.dependencies.any(
|
(patch) => patch.dependencies.any(
|
||||||
(dep) => dep.contains('integrations'),
|
(dep) => dependencyNeedsIntegrations(dep),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,15 @@ class RootAPI {
|
|||||||
final String _postFsDataDirPath = '/data/adb/post-fs-data.d';
|
final String _postFsDataDirPath = '/data/adb/post-fs-data.d';
|
||||||
final String _serviceDDirPath = '/data/adb/service.d';
|
final String _serviceDDirPath = '/data/adb/service.d';
|
||||||
|
|
||||||
|
Future<bool> isRooted() async {
|
||||||
|
try {
|
||||||
|
bool? isRooted = await Root.isRootAvailable();
|
||||||
|
return isRooted != null && isRooted;
|
||||||
|
} on Exception {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<bool> hasRootPermissions() async {
|
Future<bool> hasRootPermissions() async {
|
||||||
try {
|
try {
|
||||||
bool? isRooted = await Root.isRootAvailable();
|
bool? isRooted = await Root.isRootAvailable();
|
||||||
|
|||||||
@@ -18,130 +18,134 @@ class InstallerView extends StatelessWidget {
|
|||||||
onModelReady: (model) => model.initialize(context),
|
onModelReady: (model) => model.initialize(context),
|
||||||
viewModelBuilder: () => InstallerViewModel(),
|
viewModelBuilder: () => InstallerViewModel(),
|
||||||
builder: (context, model, child) => WillPopScope(
|
builder: (context, model, child) => WillPopScope(
|
||||||
child: Scaffold(
|
child: SafeArea(
|
||||||
body: CustomScrollView(
|
top: false,
|
||||||
controller: model.scrollController,
|
child: Scaffold(
|
||||||
slivers: <Widget>[
|
body: CustomScrollView(
|
||||||
CustomSliverAppBar(
|
controller: model.scrollController,
|
||||||
title: Text(
|
slivers: <Widget>[
|
||||||
model.headerLogs,
|
CustomSliverAppBar(
|
||||||
style: GoogleFonts.inter(
|
title: Text(
|
||||||
color: Theme.of(context).textTheme.headline6!.color,
|
model.headerLogs,
|
||||||
),
|
style: GoogleFonts.inter(
|
||||||
),
|
color: Theme.of(context).textTheme.headline6!.color,
|
||||||
onBackButtonPressed: () => model.onWillPop(context),
|
|
||||||
actions: <Widget>[
|
|
||||||
Visibility(
|
|
||||||
visible: !model.isPatching && !model.hasErrors,
|
|
||||||
child: CustomPopupMenu(
|
|
||||||
onSelected: (value) => model.onMenuSelection(value),
|
|
||||||
children: {
|
|
||||||
0: I18nText(
|
|
||||||
'installerView.shareApkMenuOption',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
1: I18nText(
|
|
||||||
'installerView.shareLogMenuOption',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
onBackButtonPressed: () => model.onWillPop(context),
|
||||||
bottom: PreferredSize(
|
actions: <Widget>[
|
||||||
preferredSize: const Size(double.infinity, 1.0),
|
Visibility(
|
||||||
child:
|
visible: !model.isPatching,
|
||||||
GradientProgressIndicator(progress: model.progress!)),
|
child: CustomPopupMenu(
|
||||||
),
|
onSelected: (value) => model.onMenuSelection(value),
|
||||||
SliverPadding(
|
children: {
|
||||||
padding: const EdgeInsets.all(20.0),
|
if (!model.hasErrors)
|
||||||
sliver: SliverList(
|
0: I18nText(
|
||||||
delegate: SliverChildListDelegate.fixed(
|
'installerView.shareApkMenuOption',
|
||||||
<Widget>[
|
child: const Text(
|
||||||
CustomCard(
|
'',
|
||||||
child: Text(
|
style: TextStyle(
|
||||||
model.logs,
|
fontWeight: FontWeight.bold,
|
||||||
style: GoogleFonts.jetBrainsMono(
|
),
|
||||||
fontSize: 13,
|
),
|
||||||
height: 1.5,
|
),
|
||||||
|
1: I18nText(
|
||||||
|
'installerView.shareLogMenuOption',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
bottom: PreferredSize(
|
||||||
|
preferredSize: const Size(double.infinity, 1.0),
|
||||||
|
child:
|
||||||
|
GradientProgressIndicator(progress: model.progress!)),
|
||||||
|
),
|
||||||
|
SliverPadding(
|
||||||
|
padding: const EdgeInsets.all(20.0),
|
||||||
|
sliver: SliverList(
|
||||||
|
delegate: SliverChildListDelegate.fixed(
|
||||||
|
<Widget>[
|
||||||
|
CustomCard(
|
||||||
|
child: Text(
|
||||||
|
model.logs,
|
||||||
|
style: GoogleFonts.jetBrainsMono(
|
||||||
|
fontSize: 13,
|
||||||
|
height: 1.5,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SliverFillRemaining(
|
||||||
SliverFillRemaining(
|
hasScrollBody: false,
|
||||||
hasScrollBody: false,
|
child: Align(
|
||||||
child: Align(
|
alignment: Alignment.bottomCenter,
|
||||||
alignment: Alignment.bottomCenter,
|
child: Visibility(
|
||||||
child: Visibility(
|
visible: !model.isPatching && !model.hasErrors,
|
||||||
visible: !model.isPatching && !model.hasErrors,
|
child: Padding(
|
||||||
child: Padding(
|
padding: const EdgeInsets.all(20.0).copyWith(top: 0.0),
|
||||||
padding: const EdgeInsets.all(20.0).copyWith(top: 0.0),
|
child: Row(
|
||||||
child: Row(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
children: <Widget>[
|
||||||
children: <Widget>[
|
Visibility(
|
||||||
Visibility(
|
visible: model.isInstalled,
|
||||||
visible: model.isInstalled,
|
child: CustomMaterialButton(
|
||||||
child: CustomMaterialButton(
|
label: I18nText('installerView.openButton'),
|
||||||
label: I18nText('installerView.openButton'),
|
isExpanded: true,
|
||||||
isExpanded: true,
|
onPressed: () {
|
||||||
onPressed: () {
|
model.openApp();
|
||||||
model.openApp();
|
model.cleanPatcher();
|
||||||
model.cleanPatcher();
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context).pop();
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Visibility(
|
|
||||||
visible: !model.isInstalled,
|
|
||||||
child: CustomMaterialButton(
|
|
||||||
isFilled: false,
|
|
||||||
label:
|
|
||||||
I18nText('installerView.installRootButton'),
|
|
||||||
isExpanded: true,
|
|
||||||
onPressed: () => model.installResult(
|
|
||||||
context,
|
|
||||||
true,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Visibility(
|
||||||
Visibility(
|
visible: !model.isInstalled && model.isRooted,
|
||||||
visible: !model.isInstalled,
|
child: CustomMaterialButton(
|
||||||
child: const SizedBox(
|
isFilled: false,
|
||||||
width: 16,
|
label:
|
||||||
),
|
I18nText('installerView.installRootButton'),
|
||||||
),
|
isExpanded: true,
|
||||||
Visibility(
|
onPressed: () => model.installResult(
|
||||||
visible: !model.isInstalled,
|
context,
|
||||||
child: CustomMaterialButton(
|
true,
|
||||||
label: I18nText('installerView.installButton'),
|
),
|
||||||
isExpanded: true,
|
|
||||||
onPressed: () => model.installResult(
|
|
||||||
context,
|
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
Visibility(
|
||||||
],
|
visible: !model.isInstalled,
|
||||||
|
child: const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Visibility(
|
||||||
|
visible: !model.isInstalled,
|
||||||
|
child: CustomMaterialButton(
|
||||||
|
label: I18nText('installerView.installButton'),
|
||||||
|
isExpanded: true,
|
||||||
|
onPressed: () => model.installResult(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
onWillPop: () => model.onWillPop(context),
|
onWillPop: () => model.onWillPop(context),
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// ignore_for_file: use_build_context_synchronously
|
||||||
import 'package:device_apps/device_apps.dart';
|
import 'package:device_apps/device_apps.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -9,6 +10,7 @@ import 'package:revanced_manager/models/patch.dart';
|
|||||||
import 'package:revanced_manager/models/patched_application.dart';
|
import 'package:revanced_manager/models/patched_application.dart';
|
||||||
import 'package:revanced_manager/services/manager_api.dart';
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
import 'package:revanced_manager/services/patcher_api.dart';
|
import 'package:revanced_manager/services/patcher_api.dart';
|
||||||
|
import 'package:revanced_manager/services/root_api.dart';
|
||||||
import 'package:revanced_manager/services/toast.dart';
|
import 'package:revanced_manager/services/toast.dart';
|
||||||
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';
|
import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';
|
||||||
@@ -18,6 +20,7 @@ import 'package:wakelock/wakelock.dart';
|
|||||||
class InstallerViewModel extends BaseViewModel {
|
class InstallerViewModel extends BaseViewModel {
|
||||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||||
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
||||||
|
final RootAPI _rootAPI = RootAPI();
|
||||||
final Toast _toast = locator<Toast>();
|
final Toast _toast = locator<Toast>();
|
||||||
final PatchedApplication _app = locator<PatcherViewModel>().selectedApp!;
|
final PatchedApplication _app = locator<PatcherViewModel>().selectedApp!;
|
||||||
final List<Patch> _patches = locator<PatcherViewModel>().selectedPatches;
|
final List<Patch> _patches = locator<PatcherViewModel>().selectedPatches;
|
||||||
@@ -28,11 +31,13 @@ class InstallerViewModel extends BaseViewModel {
|
|||||||
double? progress = 0.0;
|
double? progress = 0.0;
|
||||||
String logs = '';
|
String logs = '';
|
||||||
String headerLogs = '';
|
String headerLogs = '';
|
||||||
|
bool isRooted = false;
|
||||||
bool isPatching = true;
|
bool isPatching = true;
|
||||||
bool isInstalled = false;
|
bool isInstalled = false;
|
||||||
bool hasErrors = false;
|
bool hasErrors = false;
|
||||||
|
|
||||||
Future<void> initialize(BuildContext context) async {
|
Future<void> initialize(BuildContext context) async {
|
||||||
|
isRooted = await _rootAPI.isRooted();
|
||||||
if (await Permission.ignoreBatteryOptimizations.isGranted) {
|
if (await Permission.ignoreBatteryOptimizations.isGranted) {
|
||||||
try {
|
try {
|
||||||
FlutterBackground.initialize(
|
FlutterBackground.initialize(
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class _ContributorsCardState extends State<ContributorsCard> {
|
|||||||
'',
|
'',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 4),
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
I18nText('latestCommitCard.managerLabel'),
|
I18nText('latestCommitCard.managerLabel'),
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class AppSelectorCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 8),
|
||||||
locator<PatcherViewModel>().selectedApp == null
|
locator<PatcherViewModel>().selectedApp == null
|
||||||
? I18nText('appSelectorCard.widgetSubtitle')
|
? I18nText('appSelectorCard.widgetSubtitle')
|
||||||
: Row(
|
: Row(
|
||||||
@@ -49,21 +49,21 @@ class AppSelectorCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Text(locator<PatcherViewModel>().getAppSelectionString()),
|
Text(
|
||||||
|
locator<PatcherViewModel>()
|
||||||
|
.getAppSelectionString(),
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
locator<PatcherViewModel>().selectedApp == null
|
locator<PatcherViewModel>().selectedApp == null
|
||||||
? Container()
|
? Container()
|
||||||
: Column(
|
: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 4),
|
||||||
Padding(
|
Text(
|
||||||
padding: const EdgeInsets.only(left: 20),
|
locator<PatcherViewModel>()
|
||||||
child: Text(
|
.getRecommendedVersionString(context),
|
||||||
locator<PatcherViewModel>()
|
|
||||||
.getRecommendedVersionString(context),
|
|
||||||
style: const TextStyle(fontStyle: FontStyle.italic),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class PatchSelectorCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 4),
|
||||||
locator<PatcherViewModel>().selectedApp == null
|
locator<PatcherViewModel>().selectedApp == null
|
||||||
? I18nText('patchSelectorCard.widgetSubtitle')
|
? I18nText('patchSelectorCard.widgetSubtitle')
|
||||||
: locator<PatcherViewModel>().selectedPatches.isEmpty
|
: locator<PatcherViewModel>().selectedPatches.isEmpty
|
||||||
@@ -46,7 +46,7 @@ class PatchSelectorCard extends StatelessWidget {
|
|||||||
String _getPatchesSelection() {
|
String _getPatchesSelection() {
|
||||||
String text = '';
|
String text = '';
|
||||||
for (Patch p in locator<PatcherViewModel>().selectedPatches) {
|
for (Patch p in locator<PatcherViewModel>().selectedPatches) {
|
||||||
text += '${p.getSimpleName()} (v${p.version})\n';
|
text += '\u2022 ${p.getSimpleName()} (v${p.version})\n';
|
||||||
}
|
}
|
||||||
return text.substring(0, text.length - 1);
|
return text.substring(0, text.length - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,13 +58,21 @@ class _PatchItemState extends State<PatchItem> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
widget.simpleName,
|
widget.simpleName,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 6),
|
||||||
Text(widget.version)
|
Text(
|
||||||
|
widget.version,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
@@ -73,7 +81,10 @@ class _PatchItemState extends State<PatchItem> {
|
|||||||
softWrap: true,
|
softWrap: true,
|
||||||
maxLines: 3,
|
maxLines: 3,
|
||||||
overflow: TextOverflow.visible,
|
overflow: TextOverflow.visible,
|
||||||
style: const TextStyle(fontSize: 14),
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Theme.of(context).colorScheme.onSecondaryContainer,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -104,12 +115,12 @@ class _PatchItemState extends State<PatchItem> {
|
|||||||
padding: const EdgeInsets.only(top: 8),
|
padding: const EdgeInsets.only(top: 8),
|
||||||
child: TextButton.icon(
|
child: TextButton.icon(
|
||||||
label: I18nText('patchItem.unsupportedWarningButton'),
|
label: I18nText('patchItem.unsupportedWarningButton'),
|
||||||
icon: const Icon(Icons.warning),
|
icon: const Icon(Icons.warning, size: 20.0),
|
||||||
onPressed: () => _showUnsupportedWarningDialog(),
|
onPressed: () => _showUnsupportedWarningDialog(),
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
shape: MaterialStateProperty.all(
|
shape: MaterialStateProperty.all(
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(8),
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
width: 1,
|
width: 1,
|
||||||
color:
|
color:
|
||||||
|
|||||||
@@ -50,93 +50,94 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ExpandableController expController = ExpandableController();
|
ExpandableController expController = ExpandableController();
|
||||||
return ExpandablePanel(
|
return Container(
|
||||||
controller: expController,
|
margin: const EdgeInsets.only(bottom: 16.0),
|
||||||
theme: const ExpandableThemeData(
|
child: CustomCard(
|
||||||
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
onTap: () {
|
||||||
tapBodyToCollapse: false,
|
expController.toggle();
|
||||||
tapBodyToExpand: false,
|
_animationController.isCompleted
|
||||||
tapHeaderToExpand: false,
|
? _animationController.reverse()
|
||||||
hasIcon: false,
|
: _animationController.forward();
|
||||||
animationDuration: Duration(milliseconds: 450),
|
},
|
||||||
),
|
child: ExpandablePanel(
|
||||||
header: Padding(
|
controller: expController,
|
||||||
padding: const EdgeInsets.only(bottom: 16.0),
|
theme: const ExpandableThemeData(
|
||||||
child: CustomCard(
|
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
onTap: () {
|
tapBodyToCollapse: false,
|
||||||
expController.toggle();
|
tapBodyToExpand: false,
|
||||||
_animationController.isCompleted
|
tapHeaderToExpand: false,
|
||||||
? _animationController.reverse()
|
hasIcon: false,
|
||||||
: _animationController.forward();
|
animationDuration: Duration(milliseconds: 450),
|
||||||
},
|
),
|
||||||
child: Row(
|
header: Row(
|
||||||
children: <Widget>[
|
|
||||||
SizedBox(
|
|
||||||
width: 40,
|
|
||||||
child: Image.memory(widget.icon, height: 40, width: 40),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 4),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(left: 15.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
widget.name.length > 9
|
|
||||||
? '${widget.name.substring(0, 9)}...'
|
|
||||||
: widget.name,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(format(widget.patchDate)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
RotationTransition(
|
|
||||||
turns:
|
|
||||||
Tween(begin: 0.0, end: 0.50).animate(_animationController),
|
|
||||||
child: const Padding(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
child: Icon(Icons.arrow_drop_down),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
CustomMaterialButton(
|
SizedBox(
|
||||||
label: widget.isUpdatableApp
|
width: 40,
|
||||||
? I18nText('applicationItem.patchButton')
|
child: Image.memory(widget.icon, height: 40, width: 40),
|
||||||
: I18nText('applicationItem.infoButton'),
|
),
|
||||||
onPressed: widget.onPressed,
|
const SizedBox(width: 4),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 15.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(
|
||||||
|
widget.name.length > 12
|
||||||
|
? '${widget.name.substring(0, 12)}...'
|
||||||
|
: widget.name,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(format(widget.patchDate)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
RotationTransition(
|
||||||
|
turns: Tween(begin: 0.0, end: 0.50)
|
||||||
|
.animate(_animationController),
|
||||||
|
child: const Padding(
|
||||||
|
padding: EdgeInsets.all(8.0),
|
||||||
|
child: Icon(Icons.arrow_drop_down),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
CustomMaterialButton(
|
||||||
|
label: widget.isUpdatableApp
|
||||||
|
? I18nText('applicationItem.patchButton')
|
||||||
|
: I18nText('applicationItem.infoButton'),
|
||||||
|
onPressed: widget.onPressed,
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
collapsed: const SizedBox(),
|
||||||
|
expanded: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
I18nText(
|
||||||
|
'applicationItem.changelogLabel',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
)
|
||||||
collapsed: const SizedBox(),
|
|
||||||
expanded: Padding(
|
|
||||||
padding: const EdgeInsets.all(16.0).copyWith(top: 0.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
I18nText(
|
|
||||||
'applicationItem.changelogLabel',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w700),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ homepage: https://github.com/revanced/revanced-manager
|
|||||||
|
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.0.22+22
|
version: 0.0.26+26
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.5 <3.0.0"
|
sdk: ">=2.17.5 <3.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user