chore: run dart format
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions

This commit is contained in:
Dr.Blank 2026-01-10 16:51:05 +05:30
parent a520136e01
commit e23c0b6c5f
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B
84 changed files with 1565 additions and 1945 deletions

View file

@ -9,9 +9,7 @@ import 'package:vaani/settings/view/simple_settings_page.dart';
import 'package:vaani/shared/extensions/enum.dart';
class ShakeDetectorSettingsPage extends HookConsumerWidget {
const ShakeDetectorSettingsPage({
super.key,
});
const ShakeDetectorSettingsPage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
@ -41,7 +39,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget {
),
initialValue: shakeDetectionSettings.isEnabled,
onToggle: (value) {
ref.read(appSettingsProvider.notifier).update(
ref
.read(appSettingsProvider.notifier)
.update(
appSettings.copyWith.shakeDetectionSettings(
isEnabled: value,
),
@ -77,7 +77,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget {
);
if (newThreshold != null) {
ref.read(appSettingsProvider.notifier).update(
ref
.read(appSettingsProvider.notifier)
.update(
appSettings.copyWith.shakeDetectionSettings(
threshold: newThreshold,
),
@ -107,7 +109,9 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget {
);
if (newShakeAction != null) {
ref.read(appSettingsProvider.notifier).update(
ref
.read(appSettingsProvider.notifier)
.update(
appSettings.copyWith.shakeDetectionSettings(
shakeAction: newShakeAction,
),
@ -131,26 +135,23 @@ class ShakeDetectorSettingsPage extends HookConsumerWidget {
)
: Wrap(
spacing: 8.0,
children: shakeDetectionSettings.feedback.map(
(feedback) {
return Icon(
feedback.icon,
color: selectedValueColor,
);
},
).toList(),
children: shakeDetectionSettings.feedback.map((feedback) {
return Icon(feedback.icon, color: selectedValueColor);
}).toList(),
),
onPressed: (context) async {
final newFeedback =
await showDialog<Set<ShakeDetectedFeedback>>(
context: context,
builder: (context) => ShakeFeedbackSelector(
initialValue: shakeDetectionSettings.feedback,
),
);
context: context,
builder: (context) => ShakeFeedbackSelector(
initialValue: shakeDetectionSettings.feedback,
),
);
if (newFeedback != null) {
ref.read(appSettingsProvider.notifier).update(
ref
.read(appSettingsProvider.notifier)
.update(
appSettings.copyWith.shakeDetectionSettings(
feedback: newFeedback,
),
@ -256,10 +257,7 @@ class ShakeActionSelector extends HookConsumerWidget {
}
class ShakeForceSelector extends HookConsumerWidget {
const ShakeForceSelector({
super.key,
this.initialValue = 6,
});
const ShakeForceSelector({super.key, this.initialValue = 6});
final double initialValue;
@ -291,9 +289,7 @@ class ShakeForceSelector extends HookConsumerWidget {
shakeForce.value = 0;
},
),
helper: const Text(
'Enter a number to set the threshold in m/s²',
),
helper: const Text('Enter a number to set the threshold in m/s²'),
),
),
Wrap(