mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-30 05:54:26 +02:00
feat: show selected patches count in patches selector view & patch selector card (#466)
* feat: show selected patches count in patches selector view & patch selector card * fix: add Widget on row * fix: formatting * fix: same text style for count
This commit is contained in:
parent
0fc8e7cbc8
commit
2c3809d2bc
@ -25,7 +25,12 @@ class _PatchesSelectorViewState extends State<PatchesSelectorView> {
|
|||||||
floatingActionButton: Visibility(
|
floatingActionButton: Visibility(
|
||||||
visible: model.patches.isNotEmpty,
|
visible: model.patches.isNotEmpty,
|
||||||
child: FloatingActionButton.extended(
|
child: FloatingActionButton.extended(
|
||||||
label: I18nText('patchesSelectorView.doneButton'),
|
label: Row(
|
||||||
|
children: <Widget>[
|
||||||
|
I18nText('patchesSelectorView.doneButton'),
|
||||||
|
Text(' (${model.selectedPatches.length})')
|
||||||
|
],
|
||||||
|
),
|
||||||
icon: const Icon(Icons.check),
|
icon: const Icon(Icons.check),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
model.selectPatches();
|
model.selectPatches();
|
||||||
|
@ -19,6 +19,8 @@ class PatchSelectorCard extends StatelessWidget {
|
|||||||
onTap: onPressed,
|
onTap: onPressed,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
I18nText(
|
I18nText(
|
||||||
locator<PatcherViewModel>().selectedPatches.isEmpty
|
locator<PatcherViewModel>().selectedPatches.isEmpty
|
||||||
@ -32,6 +34,17 @@ class PatchSelectorCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Text(
|
||||||
|
locator<PatcherViewModel>().selectedPatches.isEmpty
|
||||||
|
? ''
|
||||||
|
: ' (${locator<PatcherViewModel>().selectedPatches.length})',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
locator<PatcherViewModel>().selectedApp == null
|
locator<PatcherViewModel>().selectedApp == null
|
||||||
? I18nText('patchSelectorCard.widgetSubtitle')
|
? I18nText('patchSelectorCard.widgetSubtitle')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user