mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: add installer and enable app selection from storage (#2)
This commit is contained in:
@ -45,7 +45,7 @@ class AppSelectorCard extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
locator<AppSelectorViewModel>().selectedApp != null
|
||||
? Text(
|
||||
locator<AppSelectorViewModel>().selectedApp!.packageName!,
|
||||
locator<AppSelectorViewModel>().selectedApp!.packageName,
|
||||
style: robotoTextStyle,
|
||||
)
|
||||
: I18nText(
|
||||
|
@ -1,5 +1,4 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:revanced_manager/constants.dart';
|
||||
|
@ -33,59 +33,52 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
I18nText(
|
||||
'latestCommitCard.patcherLabel',
|
||||
child: Text(
|
||||
'',
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
I18nText(
|
||||
'latestCommitCard.patcherLabel',
|
||||
child: Text(
|
||||
'',
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: githubAPI.latestCommitTime(
|
||||
'revanced',
|
||||
'revanced-patcher',
|
||||
),
|
||||
initialData: FlutterI18n.translate(
|
||||
context,
|
||||
'latestCommitCard.loadingLabel',
|
||||
),
|
||||
builder: (context, snapshot) => Text(
|
||||
snapshot.data!,
|
||||
style: robotoTextStyle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
I18nText(
|
||||
'latestCommitCard.managerLabel',
|
||||
child: Text(
|
||||
'',
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: githubAPI.latestCommitTime(
|
||||
'revanced',
|
||||
'revanced-patcher',
|
||||
),
|
||||
initialData: FlutterI18n.translate(
|
||||
context,
|
||||
'latestCommitCard.loadingLabel',
|
||||
),
|
||||
builder: (context, snapshot) => Text(
|
||||
snapshot.data!,
|
||||
style: robotoTextStyle,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
I18nText(
|
||||
'latestCommitCard.managerLabel',
|
||||
child: Text(
|
||||
'',
|
||||
style: GoogleFonts.roboto(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: githubAPI.latestCommitTime(
|
||||
'revanced',
|
||||
'revanced-patcher',
|
||||
),
|
||||
initialData: FlutterI18n.translate(
|
||||
context,
|
||||
'latestCommitCard.loadingLabel',
|
||||
),
|
||||
builder: (context, snapshot) => Text(
|
||||
snapshot.data!,
|
||||
style: robotoTextStyle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
FutureBuilder<String>(
|
||||
future: githubAPI.latestCommitTime(
|
||||
'revanced',
|
||||
'revanced-patcher',
|
||||
),
|
||||
initialData: FlutterI18n.translate(
|
||||
context,
|
||||
'latestCommitCard.loadingLabel',
|
||||
),
|
||||
builder: (context, snapshot) => Text(
|
||||
snapshot.data!,
|
||||
style: robotoTextStyle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -25,64 +25,69 @@ class PatchItem extends StatefulWidget {
|
||||
class _PatchItemState extends State<PatchItem> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
||||
margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
widget.simpleName,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
return InkWell(
|
||||
onTap: () => setState(() {
|
||||
widget.isSelected = !widget.isSelected;
|
||||
}),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 12),
|
||||
margin: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
widget.simpleName,
|
||||
style: GoogleFonts.inter(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(widget.version)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
widget.description,
|
||||
softWrap: true,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.visible,
|
||||
style: GoogleFonts.roboto(
|
||||
fontSize: 14,
|
||||
const SizedBox(width: 4),
|
||||
Text(widget.version)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
widget.description,
|
||||
softWrap: true,
|
||||
maxLines: 3,
|
||||
overflow: TextOverflow.visible,
|
||||
style: GoogleFonts.roboto(
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Transform.scale(
|
||||
scale: 1.2,
|
||||
child: Checkbox(
|
||||
value: widget.isSelected,
|
||||
activeColor: Colors.blueGrey[500],
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
widget.isSelected = newValue!;
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
Transform.scale(
|
||||
scale: 1.2,
|
||||
child: Checkbox(
|
||||
value: widget.isSelected,
|
||||
activeColor: Colors.blueGrey[500],
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
widget.isSelected = newValue!;
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user