mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-06-12 04:37:37 +02:00
fix: improve patches selector.
This commit is contained in:
@ -17,12 +17,15 @@ class PatcherView extends StatelessWidget {
|
||||
disposeViewModel: false,
|
||||
viewModelBuilder: () => locator<PatcherViewModel>(),
|
||||
builder: (context, model, child) => Scaffold(
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () => {},
|
||||
label: I18nText('patcherView.fabButton'),
|
||||
icon: const Icon(Icons.build),
|
||||
backgroundColor: const Color(0xff7792BA),
|
||||
foregroundColor: Colors.white,
|
||||
floatingActionButton: Visibility(
|
||||
visible: locator<PatcherViewModel>().hideFabButton,
|
||||
child: FloatingActionButton.extended(
|
||||
onPressed: () => {},
|
||||
label: I18nText('patcherView.fabButton'),
|
||||
icon: const Icon(Icons.build),
|
||||
backgroundColor: const Color(0xff7792BA),
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
),
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
@ -46,8 +49,11 @@ class PatcherView extends StatelessWidget {
|
||||
onPressed: model.navigateToAppSelector,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
PatchSelectorCard(
|
||||
onPressed: model.navigateToPatchesSelector,
|
||||
Opacity(
|
||||
opacity: model.dimPatchCard ? 0.5 : 1,
|
||||
child: PatchSelectorCard(
|
||||
onPressed: model.navigateToPatchesSelector,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -5,6 +5,8 @@ import 'package:stacked_services/stacked_services.dart';
|
||||
|
||||
class PatcherViewModel extends BaseViewModel {
|
||||
final _navigationService = locator<NavigationService>();
|
||||
bool dimPatchCard = true;
|
||||
bool hideFabButton = true;
|
||||
|
||||
void navigateToAppSelector() {
|
||||
_navigationService.navigateTo(Routes.appSelectorView);
|
||||
|
Reference in New Issue
Block a user