mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 12:47:37 +02:00
feat: improve ux (#752)
* feat: restart app toast when changing sources, api url * fix: potentially fix manager stuck on black screen * feat: remove select all patches chip * feat: show all apps and recommended versions * chore(i18n): remove unused strings remove unused strings left out in7e05bca
* feat: select install type before patching * feat: update patches button (#782) * feat: update patches button * feat: show toast when force refresh * chore: don't translate "ReVanced Manager" and "ReVanced Patches" * Revert "feat: select install type before patching" This reverts commit74e0c09b54
. * feat: rename recommended patches to default patches * feat: add missing localization * feat: display restart app toast for resetting source --------- Co-authored-by: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com>
This commit is contained in:
85
lib/ui/widgets/appSelectorView/not_installed_app_item.dart
Normal file
85
lib/ui/widgets/appSelectorView/not_installed_app_item.dart
Normal file
@ -0,0 +1,85 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
|
||||
|
||||
class NotInstalledAppItem extends StatefulWidget {
|
||||
const NotInstalledAppItem({
|
||||
Key? key,
|
||||
required this.name,
|
||||
required this.patchesCount,
|
||||
required this.recommendedVersion,
|
||||
this.onTap,
|
||||
}) : super(key: key);
|
||||
final String name;
|
||||
final int patchesCount;
|
||||
final String recommendedVersion;
|
||||
final Function()? onTap;
|
||||
|
||||
@override
|
||||
State<NotInstalledAppItem> createState() => _NotInstalledAppItem();
|
||||
}
|
||||
|
||||
class _NotInstalledAppItem extends State<NotInstalledAppItem> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: CustomCard(
|
||||
onTap: widget.onTap,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
height: 48,
|
||||
padding: const EdgeInsets.symmetric(vertical: 4.0),
|
||||
alignment: Alignment.center,
|
||||
child: const CircleAvatar(
|
||||
backgroundColor: Colors.transparent,
|
||||
child: Icon(
|
||||
Icons.square_rounded,
|
||||
color: Colors.grey,
|
||||
size: 44,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
widget.name,
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const Text('App not installed.'),
|
||||
const SizedBox(height: 4),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
widget.recommendedVersion.isEmpty
|
||||
? 'All versions'
|
||||
: widget.recommendedVersion,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
widget.patchesCount == 1
|
||||
? '• ${widget.patchesCount} patch'
|
||||
: '• ${widget.patchesCount} patches',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.secondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user