Skip to content

Commit

Permalink
Merge pull request #15 from dillonfagan/v1.0.1
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
dillonfagan authored Feb 24, 2023
2 parents df33dc4 + c2cf68c commit ae65f12
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
8 changes: 6 additions & 2 deletions lib/pages/timer/timer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import 'widgets/display.dart';
import 'widgets/next_button.dart';

class TimerPage extends StatefulWidget {
const TimerPage({super.key, this.seconds = 5});
TimerPage({super.key, this.seconds = 5});

final int seconds;
final AudioPlayer audioPlayer = AudioPlayer(playerId: '#timer');

@override
State<TimerPage> createState() => _TimerPageState();
Expand Down Expand Up @@ -49,7 +50,10 @@ class _TimerPageState extends State<TimerPage> {
}

void _playChime() async {
await AudioPlayer().play(UrlSource('sounds/chime.wav'));
await widget.audioPlayer.play(
AssetSource('sounds/chime.wav'),
volume: 1.0,
);
}

@override
Expand Down
1 change: 1 addition & 0 deletions lib/pages/timer/widgets/end_mob_alert.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EndMobAlertDialog extends StatelessWidget {
),
),
],
actionsPadding: const EdgeInsets.all(16),
);
}
}
6 changes: 5 additions & 1 deletion lib/providers/mob.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:mob_app/common/log.dart';
import 'package:mob_app/models/mobber.dart';

Expand Down Expand Up @@ -39,6 +39,10 @@ class MobProvider extends ChangeNotifier {
bool get isOnBreak => state == MobState.onBreak;

int get turnLength {
if (kDebugMode) {
return 2;
}

if (_mobbers.isEmpty) {
return 0;
}
Expand Down
20 changes: 10 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "271b8899fc99f9df4f4ed419fa14e2fff392c7b2c162fbb87b222e2e963ddc73"
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.dev"
source: hosted
version: "2.9.0"
version: "2.10.0"
audioplayers:
dependency: "direct main"
description:
Expand Down Expand Up @@ -69,10 +69,10 @@ packages:
dependency: transitive
description:
name: boolean_selector
sha256: "5bbf32bc9e518d41ec49718e2931cd4527292c9b0c6d2dffcf7fe6b9a8a8cf72"
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -196,10 +196,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "80c2989398773fa06e2457e9ff08580f24e9858b28462a722241cb53e5613478"
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
url: "https://pub.dev"
source: hosted
version: "0.12.12"
version: "0.12.13"
material_color_utilities:
dependency: transitive
description:
Expand Down Expand Up @@ -353,10 +353,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "862015c5db1f3f3c4ea3b94dc2490363a84262994b88902315ed74be1155612f"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -369,10 +369,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: ceeddf59d613e862e77f4b506cfc2945ac9637ce0b4c00f4f4c1ac639f3e9731
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
url: "https://pub.dev"
source: hosted
version: "0.4.14"
version: "0.4.16"
typed_data:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Mob
name: mob_app
description: Mob programming done simply.

# The following line prevents the package from being accidentally published to
Expand Down Expand Up @@ -66,7 +66,7 @@ flutter:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
assets:
- sounds/chime.wav
- web/sounds/

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
Expand Down
File renamed without changes.

0 comments on commit ae65f12

Please sign in to comment.