feat: add haptic feedback (#1459)

Co-authored-by: Ushie <ushiekane@gmail.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Benjamin
2024-01-14 14:29:24 -08:00
committed by GitHub
parent ef9b1d5c2d
commit 7911459817
21 changed files with 236 additions and 19 deletions

View File

@ -5,6 +5,8 @@ import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';
import 'package:revanced_manager/services/toast.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_checkbox.dart';
import 'package:revanced_manager/ui/widgets/shared/haptics/haptic_custom_card.dart';
// ignore: must_be_immutable
class PatchItem extends StatefulWidget {
@ -56,7 +58,7 @@ class _PatchItemState extends State<PatchItem> {
widget._managerAPI.isVersionCompatibilityCheckEnabled() == true
? 0.5
: 1,
child: CustomCard(
child: HapticCustomCard(
padding: EdgeInsets.only(
top: 12,
bottom: 16,
@ -88,7 +90,7 @@ class _PatchItemState extends State<PatchItem> {
children: [
Transform.scale(
scale: 1.2,
child: Checkbox(
child: HapticCheckbox(
value: widget.isSelected,
activeColor: Theme.of(context).colorScheme.primary,
checkColor: Theme.of(context).colorScheme.secondaryContainer,