mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-09 20:49:29 +00:00
feat: add shake detection functionality (#36)
* feat: add shake detection functionality and integrate vibration support * feat: add shake detector settings page
This commit is contained in:
parent
2e3b1de529
commit
b229c4f2f5
25 changed files with 1423 additions and 158 deletions
|
|
@ -1,8 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
import 'package:vaani/features/player/providers/audiobook_player.dart';
|
||||
import 'package:vaani/features/sleep_timer/core/sleep_timer.dart'
|
||||
as core;
|
||||
import 'package:vaani/features/sleep_timer/core/sleep_timer.dart' as core;
|
||||
import 'package:vaani/settings/app_settings_provider.dart';
|
||||
import 'package:vaani/shared/extensions/time_of_day.dart';
|
||||
|
||||
|
|
@ -48,9 +47,16 @@ class SleepTimer extends _$SleepTimer {
|
|||
);
|
||||
ref.onDispose(timer.dispose);
|
||||
state = timer;
|
||||
state!.startCountDown();
|
||||
}
|
||||
}
|
||||
|
||||
void restartTimer() {
|
||||
state?.restartTimer();
|
||||
|
||||
ref.notifyListeners();
|
||||
}
|
||||
|
||||
void cancelTimer() {
|
||||
state?.dispose();
|
||||
state = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue