diff --git a/assets/beep.mp3 b/assets/beep.mp3 new file mode 100644 index 0000000..fdcaa16 Binary files /dev/null and b/assets/beep.mp3 differ diff --git a/assets/cool_down.mp3 b/assets/cool_down.mp3 new file mode 100644 index 0000000..fc6504b Binary files /dev/null and b/assets/cool_down.mp3 differ diff --git a/assets/finish.mp3 b/assets/finish.mp3 new file mode 100644 index 0000000..de51d68 Binary files /dev/null and b/assets/finish.mp3 differ diff --git a/assets/go.mp3 b/assets/go.mp3 new file mode 100644 index 0000000..ecaaa16 Binary files /dev/null and b/assets/go.mp3 differ diff --git a/assets/warmUp.mp3 b/assets/warmUp.mp3 new file mode 100644 index 0000000..68aa61f Binary files /dev/null and b/assets/warmUp.mp3 differ diff --git a/assets/workout.mp3 b/assets/workout.mp3 new file mode 100644 index 0000000..db0cabd Binary files /dev/null and b/assets/workout.mp3 differ diff --git a/lib/pages/interval_page.dart b/lib/pages/interval_page.dart new file mode 100644 index 0000000..a712243 --- /dev/null +++ b/lib/pages/interval_page.dart @@ -0,0 +1,186 @@ +import 'dart:async'; +import 'package:audioplayers/audioplayers.dart'; +import 'package:flutter/material.dart'; + +class IntervalTimerPage extends StatefulWidget { + const IntervalTimerPage({Key? key}) : super(key: key); + + @override + _IntervalTimerPageState createState() => _IntervalTimerPageState(); +} + +class _IntervalTimerPageState extends State { + final Duration _warmupDuration = const Duration(minutes: 5); + final Duration _cooldownDuration = const Duration(minutes: 5); + final Duration _highIntensityDuration = const Duration(minutes: 4); + final Duration _lowIntensityDuration = const Duration(minutes: 3); + late Duration _totalDuration = const Duration(minutes: 35); + AudioPlayer warmUpPlayer = AudioPlayer(); + AudioPlayer workoutPlayer = AudioPlayer(); + AudioPlayer coolDownPlayer = AudioPlayer(); + final int _numHighIntensityBlocks = 4; + final int _numLowIntensityBlocks = 3; + + Timer? _timer; + int _currentBlock = 0; + Duration _currentDuration = const Duration(); + bool _isPaused = true; + + @override + void initState() { + _currentDuration = _warmupDuration; + super.initState(); + } + + @override + void dispose() { + _timer?.cancel(); + super.dispose(); + } + + void _startTimer() { + _isPaused = false; + () async { + await AudioPlayer().play(UrlSource('assets/go.mp3')); + }(); + _timer = Timer.periodic(const Duration(seconds: 1), (_) => _tick()); + Future.delayed(const Duration(seconds: 1)).then((value) { + _playWarmUpMusic(); + }); + } + + void _resetTimer() { + () async { + await coolDownPlayer.dispose(); + await warmUpPlayer.dispose(); + await workoutPlayer.dispose(); + }(); + _isPaused = true; + _timer?.cancel(); + _currentBlock = 0; + _currentDuration = _warmupDuration; + _totalDuration = const Duration(minutes: 35); + setState(() {}); + } + + Future _playWarmUpMusic() async { + await warmUpPlayer.setReleaseMode(ReleaseMode.loop); + await warmUpPlayer.play(UrlSource('assets/warmUp.mp3')); + } + + Future _playWorkoutMusic() async { + await warmUpPlayer.dispose(); + Future.delayed(const Duration(microseconds: 600)).then((value) async { + await workoutPlayer.play(UrlSource('assets/workout.mp3')); + }); + } + + Future _intervalChange() async { + await AudioPlayer().play(UrlSource('assets/beep.mp3')); + } + + void _tick() { + setState(() { + _currentDuration = Duration( + seconds: _currentDuration.inSeconds - 1, + ); + _totalDuration = Duration( + seconds: _totalDuration.inSeconds - 1, + ); + if (_currentDuration.inSeconds < 1) { + if (_currentBlock < _numHighIntensityBlocks + _numLowIntensityBlocks) { + _intervalChange(); + if (_currentBlock == 0) { + _playWorkoutMusic(); + } + _currentBlock++; + + if (_currentBlock % 2 == 1) { + _currentDuration = _highIntensityDuration; + } else { + _currentDuration = _lowIntensityDuration; + } + } else if (_currentBlock < _numHighIntensityBlocks * 2) { + _intervalChange(); + _currentBlock++; + _currentDuration = _cooldownDuration; + () async { + await workoutPlayer.dispose(); + await coolDownPlayer.play(UrlSource('assets/cool_down.mp3')); + }(); + } else { + () async { + Future.delayed(const Duration(microseconds: 900)) + .then((value) async { + await AudioPlayer().play(UrlSource('assets/finish.mp3')); + }); + }(); + _resetTimer(); + } + } + }); + } + + 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 '$minutes:$seconds'; + } + + String _formatTotalDuration(Duration duration) { + final minutes = duration.inMinutes; + final seconds = duration.inSeconds.remainder(60); + return _formatDuration(Duration(minutes: minutes, seconds: seconds)); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + _currentBlock == 0 + ? 'Warm-up' + : _currentBlock % 2 == 1 + ? 'High Intensity' + : _currentBlock < _numHighIntensityBlocks * 2 + ? 'Low Intensity' + : 'Cool-down', + style: const TextStyle(fontSize: 32.0), + ), + const SizedBox(height: 16.0), + Text( + _formatDuration(_currentDuration), + style: const TextStyle(fontSize: 80.0), + ), + 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 { + _resetTimer(); + } + }, + ), + // ), + ], + ), + ], + ))); + } +} diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart index db4ff27..ca3c95d 100644 --- a/lib/pages/main_page.dart +++ b/lib/pages/main_page.dart @@ -3,7 +3,7 @@ import 'package:smoke_cess_app/pages/mood_page.dart'; import 'package:smoke_cess_app/pages/relapse_page.dart'; import 'package:smoke_cess_app/pages/scanner_page.dart'; import 'package:smoke_cess_app/pages/sleep_page.dart'; -import 'package:smoke_cess_app/pages/timer_page.dart'; +import 'package:smoke_cess_app/pages/interval_page.dart'; import 'package:smoke_cess_app/service/settings_service.dart'; import 'package:smoke_cess_app/widgets/missing_config_popup.dart'; @@ -28,7 +28,7 @@ class MyHomePageState extends State { static const List _widgetOptions = [ MoodPage(), SleepPage(), - StopWatchTimerPage(), + IntervalTimerPage(), RelapsePage(), ScannerPage(), ]; diff --git a/lib/pages/timer_page.dart b/lib/pages/timer_page.dart deleted file mode 100644 index a2e6f49..0000000 --- a/lib/pages/timer_page.dart +++ /dev/null @@ -1,125 +0,0 @@ -import 'dart:async'; -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}); - - @override - StopWatchTimerPageState createState() => StopWatchTimerPageState(); -} - -class StopWatchTimerPageState extends State { - Duration duration = const Duration(minutes: 1); - Timer? timer; - - bool countDown = true; - - @override - void initState() { - super.initState(); - } - - void reset() { - setState(() => duration = const Duration()); - } - - void startTimer() { - timer = Timer.periodic(const Duration(seconds: 1), (_) => addTime()); - } - - void addTime() { - final addSeconds = countDown ? -1 : 1; - setState(() { - final seconds = duration.inSeconds + addSeconds; - if (seconds < 0) { - timer?.cancel(); - } else { - duration = Duration(seconds: seconds); - } - }); - } - - 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 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'), - ]); - } - - 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)), - ], - ); - - 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, - ), - color: Colors.red) - : TimerButton( - onClicked: startTimer, - icon: const Icon( - Icons.play_arrow, - size: 50, - color: Colors.white, - ), - color: Colors.green); - } -} diff --git a/pubspec.lock b/pubspec.lock index 7dd2477..3ea0b44 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,63 +5,136 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" + audioplayers: + dependency: "direct main" + description: + name: audioplayers + sha256: "16451eab798b23ad9307aef6f9ca62bb8fb06542af8810eead0d236d3fd40a42" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + audioplayers_android: + dependency: transitive + description: + name: audioplayers_android + sha256: b2c833e6f718b6b030454e329931229afafe9327fdb002874dd544dc8bf2484d + url: "https://pub.dev" + source: hosted + version: "2.0.0" + audioplayers_darwin: + dependency: transitive + description: + name: audioplayers_darwin + sha256: e7a3c8759bf11ecfe4b20df338bf9f3d37c7719a5761c46a3833aba0ceeaacff + url: "https://pub.dev" + source: hosted + version: "3.0.1" + audioplayers_linux: + dependency: transitive + description: + name: audioplayers_linux + sha256: e95b65e1f4d4764601dac5e65f8d8186fc29401043ab020f1dacec483d708707 + url: "https://pub.dev" + source: hosted + version: "1.0.4" + audioplayers_platform_interface: + dependency: transitive + description: + name: audioplayers_platform_interface + sha256: "178581a44cb685fd798d2108111d2e98cca3400e30b9c3a05546f124fb37f600" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + audioplayers_web: + dependency: transitive + description: + name: audioplayers_web + sha256: "859ba09be2a57e57a787273f18c8cf0d9b61383870c5ee4b5632fe9adbc37edf" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + audioplayers_windows: + dependency: transitive + description: + name: audioplayers_windows + sha256: "622e01c4c357c2aaf1b956c3a0f89d97c3cb40315c03f16e3b6c2a31ff9c38bc" + url: "https://pub.dev" + source: hosted + version: "1.1.3" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted version: "6.1.4" flutter: @@ -73,7 +146,8 @@ packages: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_test: @@ -86,144 +160,204 @@ packages: description: flutter source: sdk version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" + source: hosted + version: "0.13.5" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.7" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted version: "2.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: c94db23593b89766cda57aab9ac311e3616cf87c6fa4e9749df032f66f30dcb8 + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.14" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "12307e7f0605ce3da64cf0db90e5fcab0869f3ca03f76be6bb2991ce0a55e82b" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" mobile_scanner: dependency: "direct main" description: name: mobile_scanner - url: "https://pub.dartlang.org" + sha256: "4045e8441e21f1fb8998a76fbffd054510dd3a3b1dee55c7c9a2083eee687345" + url: "https://pub.dev" source: hosted version: "3.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + url: "https://pub.dev" + source: hosted + version: "2.0.12" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + url: "https://pub.dev" + source: hosted + version: "2.0.22" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + url: "https://pub.dev" + source: hosted + version: "2.1.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9" + url: "https://pub.dev" source: hosted version: "2.1.8" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + url: "https://pub.dev" source: hosted version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + url: "https://pub.dev" source: hosted version: "2.1.3" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + url: "https://pub.dev" source: hosted version: "2.1.3" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.dartlang.org" + sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9" + url: "https://pub.dev" source: hosted version: "2.0.17" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7" + url: "https://pub.dev" source: hosted version: "2.0.15" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - url: "https://pub.dartlang.org" + sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0" + url: "https://pub.dev" source: hosted version: "2.1.3" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874 + url: "https://pub.dev" source: hosted version: "2.1.3" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 + url: "https://pub.dev" source: hosted version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 + url: "https://pub.dev" source: hosted version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9" + url: "https://pub.dev" source: hosted version: "2.1.3" sky_engine: @@ -235,65 +369,90 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "6182294da5abf431177fccc1ee02401f6df30f766bc6130a0852c6b6d7ee6b2d" + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.18" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" source: hosted version: "1.0.0" sdks: - dart: ">=2.18.2 <3.0.0" + dart: ">=2.19.0 <4.0.0" flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 92964f0..3f78ee1 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,8 +36,10 @@ dependencies: # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 shared_preferences: ^2.0.17 + audioplayers: ^3.0.1 mobile_scanner: ^3.0.0 + dev_dependencies: flutter_test: sdk: flutter @@ -60,12 +62,17 @@ flutter: uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg assets: + - beep.mp3 + - go.mp3 + - workout.mp3 + - warmUp.mp3 + - cool_down.mp3 + - finish.mp3 - group1.json - group3.json + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware