mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
feat: Show recommendation version when possible
This commit is contained in:
@ -39,7 +39,7 @@ class AppSelectorCard extends StatelessWidget {
|
||||
: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
height: 16.0,
|
||||
height: 18.0,
|
||||
child: ClipOval(
|
||||
child: Image.memory(
|
||||
locator<PatcherViewModel>().selectedApp == null
|
||||
@ -49,8 +49,23 @@ class AppSelectorCard extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(_getAppSelection()),
|
||||
const SizedBox(width: 6),
|
||||
Text(locator<PatcherViewModel>().getAppSelectionString()),
|
||||
],
|
||||
),
|
||||
locator<PatcherViewModel>().selectedApp == null
|
||||
? Container()
|
||||
: Column(
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 20),
|
||||
child: Text(
|
||||
locator<PatcherViewModel>()
|
||||
.getRecommendedVersionString(context),
|
||||
style: const TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@ -58,10 +73,4 @@ class AppSelectorCard extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
String _getAppSelection() {
|
||||
String name = locator<PatcherViewModel>().selectedApp!.name;
|
||||
String version = locator<PatcherViewModel>().selectedApp!.version;
|
||||
return '$name (v$version)';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user