revanced-manager/lib/ui/views/patcher/patcher_viewmodel.dart

19 lines
474 B
Dart
Raw Normal View History

2022-08-18 16:33:33 +02:00
import 'package:injectable/injectable.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/models/patched_application.dart';
import 'package:stacked/stacked.dart';
2022-08-18 16:33:33 +02:00
@lazySingleton
class PatcherViewModel extends BaseViewModel {
2022-08-18 16:33:33 +02:00
PatchedApplication? selectedApp;
List<Patch> selectedPatches = [];
bool showPatchButton() {
2022-08-18 16:33:33 +02:00
return selectedPatches.isNotEmpty;
}
bool dimPatchesCard() {
2022-08-18 16:33:33 +02:00
return selectedApp == null;
}
}