From fb31d1db2cfd07b0567eb0e68823012d0cb5f011 Mon Sep 17 00:00:00 2001 From: Parricc35 <63447810+Parricc35@users.noreply.github.com> Date: Sun, 19 Feb 2023 15:44:41 +0100 Subject: [PATCH] sound works and intervall needs improfmends --- assets/beep.mp3 | Bin 0 -> 6318 bytes {android => lib/android}/.gitignore | 0 {android => lib/android}/app/build.gradle | 0 .../app/src/debug/AndroidManifest.xml | 0 .../android}/app/src/main/AndroidManifest.xml | 0 .../example/smoke_cess_app/MainActivity.kt | 0 .../res/drawable-v21/launch_background.xml | 0 .../main/res/drawable/launch_background.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin .../app/src/main/res/values-night/styles.xml | 0 .../app/src/main/res/values/styles.xml | 0 .../app/src/profile/AndroidManifest.xml | 0 {android => lib/android}/build.gradle | 0 {android => lib/android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.properties | 0 {android => lib/android}/settings.gradle | 0 lib/pages/main_page.dart | 2 +- lib/pages/timer_page.dart | 228 ++++++++++-------- lib/service/settings_service.dart | 4 - pubspec.lock | 140 +++++++++++ pubspec.yaml | 9 +- 25 files changed, 273 insertions(+), 110 deletions(-) create mode 100644 assets/beep.mp3 rename {android => lib/android}/.gitignore (100%) rename {android => lib/android}/app/build.gradle (100%) rename {android => lib/android}/app/src/debug/AndroidManifest.xml (100%) rename {android => lib/android}/app/src/main/AndroidManifest.xml (100%) rename {android => lib/android}/app/src/main/kotlin/com/example/smoke_cess_app/MainActivity.kt (100%) rename {android => lib/android}/app/src/main/res/drawable-v21/launch_background.xml (100%) rename {android => lib/android}/app/src/main/res/drawable/launch_background.xml (100%) rename {android => lib/android}/app/src/main/res/mipmap-hdpi/ic_launcher.png (100%) rename {android => lib/android}/app/src/main/res/mipmap-mdpi/ic_launcher.png (100%) rename {android => lib/android}/app/src/main/res/mipmap-xhdpi/ic_launcher.png (100%) rename {android => lib/android}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {android => lib/android}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {android => lib/android}/app/src/main/res/values-night/styles.xml (100%) rename {android => lib/android}/app/src/main/res/values/styles.xml (100%) rename {android => lib/android}/app/src/profile/AndroidManifest.xml (100%) rename {android => lib/android}/build.gradle (100%) rename {android => lib/android}/gradle.properties (100%) rename {android => lib/android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {android => lib/android}/settings.gradle (100%) diff --git a/assets/beep.mp3 b/assets/beep.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..cd3a3ecded0158e5ececd0520a73cfe59915e2a3 GIT binary patch literal 6318 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 literal 0 HcmV?d00001 diff --git a/android/.gitignore b/lib/android/.gitignore similarity index 100% rename from android/.gitignore rename to lib/android/.gitignore diff --git a/android/app/build.gradle b/lib/android/app/build.gradle similarity index 100% rename from android/app/build.gradle rename to lib/android/app/build.gradle diff --git a/android/app/src/debug/AndroidManifest.xml b/lib/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from android/app/src/debug/AndroidManifest.xml rename to lib/android/app/src/debug/AndroidManifest.xml diff --git a/android/app/src/main/AndroidManifest.xml b/lib/android/app/src/main/AndroidManifest.xml similarity index 100% rename from android/app/src/main/AndroidManifest.xml rename to lib/android/app/src/main/AndroidManifest.xml diff --git a/android/app/src/main/kotlin/com/example/smoke_cess_app/MainActivity.kt b/lib/android/app/src/main/kotlin/com/example/smoke_cess_app/MainActivity.kt similarity index 100% rename from android/app/src/main/kotlin/com/example/smoke_cess_app/MainActivity.kt rename to lib/android/app/src/main/kotlin/com/example/smoke_cess_app/MainActivity.kt diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/lib/android/app/src/main/res/drawable-v21/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable-v21/launch_background.xml rename to lib/android/app/src/main/res/drawable-v21/launch_background.xml diff --git a/android/app/src/main/res/drawable/launch_background.xml b/lib/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from android/app/src/main/res/drawable/launch_background.xml rename to lib/android/app/src/main/res/drawable/launch_background.xml diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/lib/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to lib/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/lib/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to lib/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/lib/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to lib/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/lib/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to lib/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/lib/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to lib/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/android/app/src/main/res/values-night/styles.xml b/lib/android/app/src/main/res/values-night/styles.xml similarity index 100% rename from android/app/src/main/res/values-night/styles.xml rename to lib/android/app/src/main/res/values-night/styles.xml diff --git a/android/app/src/main/res/values/styles.xml b/lib/android/app/src/main/res/values/styles.xml similarity index 100% rename from android/app/src/main/res/values/styles.xml rename to lib/android/app/src/main/res/values/styles.xml diff --git a/android/app/src/profile/AndroidManifest.xml b/lib/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from android/app/src/profile/AndroidManifest.xml rename to lib/android/app/src/profile/AndroidManifest.xml diff --git a/android/build.gradle b/lib/android/build.gradle similarity index 100% rename from android/build.gradle rename to lib/android/build.gradle diff --git a/android/gradle.properties b/lib/android/gradle.properties similarity index 100% rename from android/gradle.properties rename to lib/android/gradle.properties diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/lib/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from android/gradle/wrapper/gradle-wrapper.properties rename to lib/android/gradle/wrapper/gradle-wrapper.properties diff --git a/android/settings.gradle b/lib/android/settings.gradle similarity index 100% rename from android/settings.gradle rename to lib/android/settings.gradle diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart index 3241a4c..df8c8c9 100644 --- a/lib/pages/main_page.dart +++ b/lib/pages/main_page.dart @@ -24,7 +24,7 @@ class MyHomePageState extends State { static const List _widgetOptions = [ MoodPage(), SleepPage(), - StopWatchTimerPage(), + IntervalTimerPage(), RelapsePage(), SettingsPage(), ]; diff --git a/lib/pages/timer_page.dart b/lib/pages/timer_page.dart index 691d15d..06cbabc 100644 --- a/lib/pages/timer_page.dart +++ b/lib/pages/timer_page.dart @@ -1,136 +1,160 @@ import 'dart:async'; +import 'package:audioplayers/audioplayers.dart'; import 'package:flutter/material.dart'; -import 'package:smoke_cess_app/service/settings_service.dart'; -import 'package:smoke_cess_app/widgets/timer_button.dart'; -class StopWatchTimerPage extends StatefulWidget { - const StopWatchTimerPage({super.key}); +class IntervalTimerPage extends StatefulWidget { + const IntervalTimerPage({Key? key}) : super(key: key); @override - StopWatchTimerPageState createState() => StopWatchTimerPageState(); + _IntervalTimerPageState createState() => _IntervalTimerPageState(); } -class StopWatchTimerPageState extends State { - SettingsService settings = SettingsService(); - Duration duration = const Duration(minutes: 1); - Timer? timer; - - bool countDown = true; +class _IntervalTimerPageState extends State { + final Duration _warmupDuration = const Duration(seconds: 5); + final Duration _cooldownDuration = const Duration(seconds: 5); + final Duration _highIntensityDuration = const Duration(seconds: 4); + final Duration _lowIntensityDuration = const Duration(seconds: 3); + late Duration _totalDuration = const Duration(seconds: 35); + final int _numHighIntensityBlocks = 4; + final int _numLowIntensityBlocks = 3; + Timer? _timer; + int _currentBlock = 0; + Duration _currentDuration = const Duration(); + bool _isPaused = true; @override void initState() { - setDurationWithSetting(); + _currentDuration = _warmupDuration; super.initState(); } - void setDurationWithSetting() { - settings.getIntSetting('workout_duration_minutes').then((workoutMinutes) => - {setState(() => duration = Duration(minutes: workoutMinutes ?? 10))}); + @override + void dispose() { + _timer?.cancel(); + super.dispose(); } - void reset() { - if (countDown) { - setDurationWithSetting(); - } else { - setState(() => duration = const Duration()); - } + void _startTimer() { + _isPaused = false; + _timer = Timer.periodic(const Duration(seconds: 1), (_) => _tick()); } - void startTimer() { - timer = Timer.periodic(const Duration(seconds: 1), (_) => addTime()); + void _pauseTimer() { + _isPaused = true; + _timer?.cancel(); } - void addTime() { - final addSeconds = countDown ? -1 : 1; + void _resetTimer() { + _isPaused = true; + _timer?.cancel(); + _currentBlock = 0; + _currentDuration = _warmupDuration; + _totalDuration = const Duration(minutes: 35); + setState(() {}); + } + + Future _playSoundEffect() async { + final player = AudioPlayer(); + await player.play(UrlSource('assets/beep.mp3')); + } + + void _tick() { setState(() { - final seconds = duration.inSeconds + addSeconds; - if (seconds < 0) { - timer?.cancel(); - } else { - duration = Duration(seconds: seconds); + _currentDuration = Duration( + seconds: _currentDuration.inSeconds - 1, + ); + _totalDuration = Duration( + seconds: _totalDuration.inSeconds - 1, + ); + if (_currentDuration.inSeconds == 0) { + _playSoundEffect(); + } + if (_currentDuration.inSeconds < 0) { + if (_currentBlock == 0) { + // Start high intensity blocks. + _currentBlock++; + _currentDuration = _highIntensityDuration; + } else if (_currentBlock <= _numHighIntensityBlocks) { + // Start low intensity blocks. + _currentBlock++; + _currentDuration = _lowIntensityDuration; + } else if (_currentBlock <= + _numHighIntensityBlocks + _numLowIntensityBlocks) { + // Start high intensity blocks again. + _currentBlock++; + _currentDuration = _highIntensityDuration; + } else { + // End workout. + _currentDuration = _cooldownDuration; + _pauseTimer(); + } } }); } - void stopTimer({bool resets = true}) { - if (resets) { - reset(); - } - setState(() => timer?.cancel()); - } - - @override - Widget build(BuildContext context) => Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - buildTime(), - const SizedBox( - height: 80, - ), - buildButtons() - ], - ), - ); - - Widget buildTime() { + String _formatDuration(Duration duration) { String twoDigits(int n) => n.toString().padLeft(2, '0'); final minutes = twoDigits(duration.inMinutes.remainder(60)); final seconds = twoDigits(duration.inSeconds.remainder(60)); - return Row(mainAxisAlignment: MainAxisAlignment.center, children: [ - const SizedBox( - width: 8, - ), - buildTimeCard(time: minutes, header: 'MINUTEN'), - const SizedBox( - width: 8, - ), - buildTimeCard(time: seconds, header: 'SEKUNDEN'), - ]); + return '$minutes:$seconds'; } - Widget buildTimeCard({required String time, required String header}) => - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - padding: const EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.white, borderRadius: BorderRadius.circular(20)), - child: Text( - time, - style: const TextStyle( - fontWeight: FontWeight.bold, - color: Colors.black, - fontSize: 50), - ), - ), - const SizedBox( - height: 24, - ), - Text(header, style: const TextStyle(color: Colors.black45)), - ], - ); + String _formatTotalDuration(Duration duration) { + final minutes = duration.inMinutes; + final seconds = duration.inSeconds.remainder(60); + return _formatDuration(Duration(minutes: minutes, seconds: seconds)); + } - Widget buildButtons() { - final isRunning = timer == null ? false : timer!.isActive; - final isCompleted = duration.inSeconds == 0; - return isRunning || isCompleted - ? TimerButton( - onClicked: stopTimer, - icon: const Icon( - Icons.stop, - size: 50, - color: Colors.white, + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Interval Timer'), + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + _currentBlock == 0 + ? 'Warm-up' + : _currentBlock <= _numHighIntensityBlocks + ? 'High Intensity' + : 'Low Intensity', + style: const TextStyle(fontSize: 32.0), ), - color: Colors.red) - : TimerButton( - onClicked: startTimer, - icon: const Icon( - Icons.play_arrow, - size: 50, - color: Colors.white, + const SizedBox(height: 16.0), + Text( + _formatDuration(_currentDuration), + style: const TextStyle(fontSize: 80.0), ), - color: Colors.green); + const SizedBox(height: 32.0), + Text( + 'Total: ${_formatTotalDuration(_totalDuration)}', + style: const TextStyle(fontSize: 24.0), + ), + const SizedBox(height: 32.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + IconButton( + icon: Icon(_isPaused + ? Icons.play_arrow_rounded + : Icons.stop_rounded), + iconSize: 48.0, + onPressed: () { + if (_isPaused) { + _startTimer(); + } else { + _pauseTimer(); + _resetTimer(); + } + }, + ), + // ), + ], + ), + ], + ))); } } diff --git a/lib/service/settings_service.dart b/lib/service/settings_service.dart index ebd5b05..8923fb2 100644 --- a/lib/service/settings_service.dart +++ b/lib/service/settings_service.dart @@ -3,10 +3,6 @@ import 'package:shared_preferences/shared_preferences.dart'; class SettingsService { final Future _prefs = SharedPreferences.getInstance(); - SettingsService() { - setIntSetting('workout_duration_minutes', 5); - } - void setStringSetting(String settingKey, String settingValue) => _prefs.then((pref) => pref.setString(settingKey, settingValue)); diff --git a/pubspec.lock b/pubspec.lock index 1cda953..3e8e4b8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -8,6 +8,62 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.9.0" + audio_session: + dependency: transitive + description: + name: audio_session + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.13" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.0" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" boolean_selector: dependency: transitive description: @@ -36,6 +92,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -86,6 +149,20 @@ packages: description: flutter source: sdk version: "0.0.0" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" js: dependency: transitive description: @@ -93,6 +170,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.4" + just_audio: + dependency: "direct main" + description: + name: just_audio + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.31" + just_audio_platform_interface: + dependency: transitive + description: + name: just_audio_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.2.0" + just_audio_web: + dependency: transitive + description: + name: just_audio_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.7" lints: dependency: transitive description: @@ -128,6 +226,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.12" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.22" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" path_provider_linux: dependency: transitive description: @@ -170,6 +289,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.2.4" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.27.7" shared_preferences: dependency: "direct main" description: @@ -266,6 +392,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.12" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ea481f5..acbffcf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A new Flutter project. # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. # A version number is three numbers separated by dots, like 1.2.43 @@ -20,7 +20,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.18.2 <3.0.0' + sdk: ">=2.18.2 <3.0.0" # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -36,6 +36,8 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 shared_preferences: ^2.0.17 + audioplayers: ^3.0.1 + just_audio: ^0.9.31 dev_dependencies: flutter_test: @@ -59,7 +61,8 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: + assets: + - beep.mp3 # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg